#include <Servo.h>

Servo myservo1; 
Servo myservo2; 
Servo myservo3;  


int pos = 0;    // variable to store the servo position

void setup() {
  myservo1.attach(9);  // attaches the servo on pin 9 to the servo object
  myservo2.attach(10);  // attaches the servo on pin 9 to the servo object
  myservo3.attach(11);  // attaches the servo on pin 9 to the servo object
}



void loop() {
  myservo1.write(0);              // tell servo to go to position in variable 'pos'
  delay(150);                       // waits 15ms for the servo to reach the position
  myservo2.write(0);              // tell servo to go to position in variable 'pos'
  delay(150);                       // waits 15ms for the servo to reach the position
  myservo3.write(0);              // tell servo to go to position in variable 'pos'
  delay(150);                       // waits 15ms for the servo to reach the position
  
  myservo1.write(90);              // tell servo to go to position in variable 'pos'
  delay(150);                       // waits 15ms for the servo to reach the position
  myservo2.write(90);              // tell servo to go to position in variable 'pos'
  delay(150);                       // waits 15ms for the servo to reach the position
  myservo3.write(180);              // tell servo to go to position in variable 'pos'
  delay(150); 

  myservo1.write(90);              // tell servo to go to position in variable 'pos'
  delay(150);                       // waits 15ms for the servo to reach the position
  myservo2.write(90);              // tell servo to go to position in variable 'pos'
  delay(150);                       // waits 15ms for the servo to reach the position
  myservo3.write(180);              // tell servo to go to position in variable 'pos'
  delay(150);    
}