(Read 67 times)
May 21, 2019, 08:45 pm
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!
Fun with Arduino
May 22, 2019, 02:19 pm
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.
Demonstration code for several things at the same time
. It covers the concept thoroughly.
Solder is electric glue
May 22, 2019, 02:31 pm
I need to know if the servo calls which include speed with this library.
What libiary? Not everyone has seen your other thread.
May 22, 2019, 07:33 pm
Yes I've used that library
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).