using servos with camera

how do you add servos to the camera…and also when the robot gets to the light how can you make the robot stop

Read this document: http://www.chiefdelphi.com/forums/attachment.php?attachmentid=4893&d=1168964099

You should be able to move your robot with the camera by the end.

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:


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.