#include <Servo.h>
Servo m1;
void setup() {
// put your setup code here, to run once:
m1.attach(3);
m1.write(90);
delay(3000);
m1.write(180);
delay(3000);
m1.write(0);
}
void loop() {
// put your main code here, to run repeatedly:
for(int i= 544 ;i < 2400 ;i++){
m1.writeMicroseconds(i);
delay(5);
}
for(int i= 2400 ;i > 544 ;i--){
m1.writeMicroseconds(i);
delay(5);
}
}