View Single Post
  #2   Spotlight this post!  
Unread 19-02-2004, 16:04
jerry w's Avatar
jerry w jerry w is offline
Free Agent Mentor
no team (Team Krunch)
Team Role: Engineer
 
Join Date: Nov 2003
Rookie Year: 2002
Location: dunedin fl
Posts: 113
jerry w has much to be proud ofjerry w has much to be proud ofjerry w has much to be proud ofjerry w has much to be proud ofjerry w has much to be proud ofjerry w has much to be proud ofjerry w has much to be proud ofjerry w has much to be proud ofjerry w has much to be proud of
Re: line seeking help needed

Quote:
Originally Posted by MisterX
if dig in 1 is on then it should turn left
if dig in 2 is on both motors should dturn equally
if dig in 3 is on then it should turn right

PWM01= left side drive
PWM02= right side drive
i think what you are trying to do is

Code:
if (rc_dig_in01 == 1) ||  (rc_dig_in02 == 1) {
    pwm01= 200;
}
else {
    pwm01= 127;
}
if (rc_dig_in02 == 1) ||  (rc_dig_in03 == 1) {
    pwm02= 200;
}
else {
    pwm02= 127;
}
jerrw w
__________________
Happiest when people tell the truth... However, I am blessed with many friends.