Log in

View Full Version : using servos with camera


team877
01-02-2007, 11:13
how do you add servos to the camera....and also when the robot gets to the light how can you make the robot stop

Kingofl337
01-02-2007, 11:21
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.

Jon Anderson
01-02-2007, 21:26
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:


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.