I apologize that wasn't concise. I meant one full rotation and then another full rotation 24 hours later.
What I had was this:
{
myServo.writeMicroseconds(1600); // spins servo for one second.
delay(1000);
myServo.writeMicroseconds(1500); // stops for 24 hours
delay(24hours);
}
However, I need to use millis() in place of delay() in order for my button press to be read properly. All of the suggestions I have been given are in reference to powering an led which uses digitalwrite and led = HIGH and led = LOW.
To recap:
-
I am looking to push a button and turn a continuous servo a full rotation. (It is around writeMicroseconds(1600) for one second.)
-
Stop for 24 hours. (writeMicroseconds(1500))
-
repeat
-
If, at any time, that button is pressed again, the sketch will stop.
I know I need to use the millis() command in order for the button press to be read properly. I just don't know how to integrate it with the writeMicroseconds().