Go Down

Topic: VarSpeedServo (Read 72 times) previous topic - next topic


I tried to post in the thread where I found this library but was unsuccessful.

Is there anyone who uses this lib?

I need to know if the servo calls which include speed with this library. That is, if I supply a speed, will the function return immediately or do I have to wait until the servo move has completed?

The thread I found was a while ago. Does anyone have another solution for a servo move where the completion time is specified that is non-blocking? That is, I specify the move to take 500ms and the sketch continues regardless!


If you write your servo code to be non-blocking, then you can control the movement of servos using the standard servo library at whatever speed you choose, and still be able to perform other tasks and respond to other inputs.

Read Robin2's Demonstration code for several things at the same time.  It covers the concept thoroughly.


I need to know if the servo calls which include speed with this library.
What libiary? Not everyone has seen your other thread.


Yes I've used that library https://github.com/netlabtoolkit/VarSpeedServo a few times. The normal VarSpeedServo library write() is non-blocking. It returns immediately no matter what speed is set. It's very easy to test that for yourself though you'll have to calibrate the speed yourself...you can't just set a fixed time like 500ms.

But note that write() also has a "wait" parameter which will cause it to block until the servo has finished the move (more or less).


Go Up