OK! I got a line sensor code (verrrrrry basic) and I would like to now a few things:
1. I know the robot will arrive at the T in under 15 secs, so how do I stop it and do something different?
2. If I stop it, we would like to raise our arm (on winch), which is on a PWM.
3. How would I stop the arm? Same way as # 1?
Code:
if (rc_dig_in01 == 0 && rc_dig_in02 == 0 && rc_dig_in03 == 0)
{
pwm13 = 127;
pwm15 = 127;
}
else if (rc_dig_in01 == 0 && rc_dig_in02 == 0 && rc_dig_in03 == 1)
{
pwm13 = 139;
pwm15 = 175;
}
else if (rc_dig_in01 == 1 && rc_dig_in02 == 0 && rc_dig_in03 == 0)
{
pwm13 = 175;
pwm15 = 139;
}
else if (rc_dig_in01 == 0 && rc_dig_in02 == 1 && rc_dig_in03 == 0)
{
pwm13 = 249;
pwm15 = 249;
}