PDA

View Full Version : How to move servo slowly?



azmax100
- 15th April 2009, 06:45
I am doing a robotic project right now. I am using a servo to pan the robot head. I know how to do it by giving pulseout command to the servo but how can I make the pan servo move slowly.

Can somebody show me some code example.

Thanks.

Ioannis
- 15th April 2009, 07:39
One way my be to send pulses in a double loop, the outer to delay the inner which is doing the actual job.

Ioannis

Archangel
- 15th April 2009, 08:22
Hmm not really up on servos, but, how about sending your pulses out sequentially in a counter loop so if you want to send it say 600 send it a for next operation of 50 + 50 . . .

Archangel
- 15th April 2009, 08:24
You might add a little pause in each increment too . . .

Ioannis
- 15th April 2009, 08:55
Servos need the train pulses constantly, say about every 20ms.

Ioannis

azmax100
- 15th April 2009, 13:50
I got it. Thanks for reply.