I don't know how write the code to make my continuous rotation servo to turn on a specific amount of time (e.g. 2 seconds, counterclockwise). I don't have a strong background on programming so, I would appreciate any helps/suggestion from you guys.
I don't know how write the code to make my continuous rotation servo to turn on a specific amount of time (e.g. 2 seconds, counterclockwise). I don't have a strong background on programming so, I would appreciate any helps/suggestion from you guys.
Thank you!
The millis() function can help you keep track of elapsed time.
The not so difficult to understand way of doing it is to start the servo moving then dodelay(2000);but this has the disadvantage of stopping the program from doing anything else for 2 seconds, hence the hint to use millis() as a timer.