|
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.
|