Go Down

Topic: Servo movement speed (Read 910 times) previous topic - next topic

JimboZA

Hi gang...

Servo movement speed seems to be an intrinsic characteristic of the model of servo.

So, if I want to slow the movement, I guess I have to cheat. I could calculate, for example, the number of degrees to move and then use some simple loop delay approach. On the face of it that would work, but calibration will be a pain in the @$$.

Are there any standard techniques for controlling the speed of a servo?
Roy from ITCrowd: Have you tried turning it off an on again?
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

wildbill

Quote
Are there any standard techniques for controlling the speed of a servo?


Not that I know of - all I've seen is your suggested delay loop, or derivatives of blink without delay.

retrolefty

Quote
Are there any standard techniques for controlling the speed of a servo?


Not built into the servo library. Using simple time delays as you describe will work if you are using just one servo and there is nothing else in the main sketch that needs servicing faster then the use of the blocking delay() statements. If you use millis() for tracking elapsed time you can avoid the blocking action of delay() and control the speed of many servos as well as assuring your main loop cycle time is fast enough to handle all else you are doing. See the blink without delay sketch example for how that method can be applied.

There has been a poster (or two?) that said they are working on modifying the servo library (or writing a new one) to use a optional velocity value for the servo.write() command. That would be very useful.

Lefty

JimboZA

Roy from ITCrowd: Have you tried turning it off an on again?
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

zoomkat

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   8)

Go Up