Void loop(){
servo.write(0);//write to 0
delay(10000);// wait 10 seconds
servo.write(180);// write to 180
delay(10000);//again 10 seconds wait
}
If you need to run other functions during this 10 seconds delay, then use millis() to servo write during every 10 seconds interval.
Void loop(){
servo.write(0);//write to 0
delay(10000);// wait 10 seconds
servo.write(180);// write to 180
delay(10000);//again 10 seconds wait
}
If you need to run other functions during this 10 seconds delay, then use millis() to servo write during every 10 seconds interval.