Im trying to move a servo from one place to another while using the typical for
loop you find in the servo's library example:
int lightON = 180;
int lightOFF = 90;
for (pos1 = lightOFF; pos1 <= lightON; pos1 += 1) {
servo1.write(pos1);
delay(15);
}
for (pos1 = lightON; pos1 >= lightOFF; pos1 -= 1) {
servo1.write(pos1);
delay(15);
}
The thing is that while this does work, I want to be able to move the servo a little quicker, but I can't use the delay()
function because of some connectivity issues with another library (BLYNK).
How could I move the servo from lightOFF to lightON the quickest way possible without using the delay()
function?