//-------------------------------------------------------------
//  Setup: - Connect a servo to +, gnd and digital pin 6 
// -----------------------------------------------------------

#include <Servo.h>
int servoPin = 6; // variable for servo pin number
Servo myservo;  // create servo object to control a servo
// twelve servo objects can be created on most boards
 
void setup() { 
  myservo.attach(servoPin);  // attaches the servo on pin 9 to the servo object
} 
 
void loop() { 
    myservo.write(180);            // tell servo to go to position 180 
    delay(1000);                                      
    myservo.write(10);              // tell servo to go to position 10
    delay(1000);  
    myservo.write(90); 
    delay(2000);
} 
