Thread: Globe Motor
View Single Post
  #2   Spotlight this post!  
Unread 15-02-2003, 20:09
Manoel's Avatar
Manoel Manoel is offline
Registered User
FRC #0383 (Brazilian Machine)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 2000
Location: Porto Alegre, RS, Brazil
Posts: 608
Manoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond repute
Send a message via ICQ to Manoel Send a message via MSN to Manoel
Here's my suggestion:

Code:
globe_motor VAR byte              ' put this in the "declare variables" section

' Main Loop:

globe_motor = 127 + (127*switch_one) - (127*switch_two)
You gotta put the globe_motor in your serout, in whatever PWM output you want.

With this code, the motor will turn CW if switch_one is pressed, and CCW if switch_two is on. If both are pressed, nothing happens.

Hope I helped, feel free to ask any question.
__________________
Manoel Flores da Cunha
Mentor
Brazilian Machine
Team # 383