Our robot will not follow a line of tape. (The banners are calibrated correctly.)
Let me explain our setup:
pwm01 = Left Drive Wheel
pwm02 = Right Drive Wheel
rc_digi_in01 = Left Banner (
WHITE Sig.)
rc_digi_in02 = Right Banner (
WHITE Sig.)
Our Autonomus Code:
PHP Code:
if (rc_dig_in01 == 1 && rc_dig_in02 == 1)
{
pwm01 = 117;
pwm02 = 117;
}
if (rc_dig_in02 == 1 && rc_dig_in01 < 1)
{
pwm01 = 117;
pwm02 = 113;
}
if (rc_dig_in02 < 1 && rc_dig_in01 == 1)
{
pwm01 = 113;
pwm02 = 117;
}
if (rc_dig_in01 < 1 && rc_dig_in02 < 1)
{
pwm01 = 137;
pwm02 = 137;
}
Our pwm output is reversed since we are driving the robot backwards in autonomus mode. (The locations I stated above are in autonomus mode.)
The problem is our robot will not do anything if the sensors are not seeing the tape. It just stops.
We are clueless, and any help would be appreciated. (This is the first time I worked with any C[++] programming other than the old "Hello, World!" program.

(If you see any bugs in our code, please respond!

))
LBK Rules; VB Programmer being suddenly forced to C by FIRST (or IFI, I don't know which). (BTW: I just got back from a meeting about an hour ago.)