#include <Servo.h>
Servo servoOBJ[1];
int pos = 0;
int i;
void setup() {
// put your setup code here, to run once:
servoOBJ[1].attach(3);
}
void loop() {
// put your main code here, to run repeatedly:
for(i=0; i<179; i++)
{
servoOBJ[1].write(i);
delay(25);
}
for(i=180; i>1; i--)
{
servoOBJ[1].write(i);
delay(15);
}
}