Quote:
Originally Posted by team877
and also when the robot gets to the light how can you make the robot stop
|
The way that we're stopping our robot in autonomous mode is having the our motors stop once the tilt servo on our camera reads a certain amount, in our case it's currently at 200. Your code look roughly something like the following:
Code:
if (TILT_SERVO > 190)
{
LEFT_DRIVE = 127;
RIGHT_DRIVE = 127;
}
TILT_SERVO being which ever output you choose (it's pwm slot 2 for the default Kevin code), and LEFT_DRIVE, RIGHT_DRIVE being their own respective pwms.