#include <Servo.h>
int servopin = 9;
Servo myServo;
long previousMillis = 0; // will store last time LED was updated
long interval = 30000; // interval at which to blink (milliseconds)
void setup(){
myServo.attach(servopin);
}
void loop(){
unsigned long currentMillis = millis();
if(currentMillis - previousMillis > interval) {
// save the last time you blinked the LED
previousMillis = currentMillis;
myServo.write(25);
delay(500);
myServo.write(155);
delay(500);
}
}