#include <Servo.h> // Add servo library
Servo servo1; // Create first servo variable
Servo servo2; // Create second servo variable
void setup() {
servo1.attach(9); // Control servo using pin 9
servo2.attach(10); // Control servo using pin 10
}
void loop() {
servo1.write(180); // Turn first servo to maximum position
delay(500); // Wait half a second
servo2.write(0); // Turn second servo to minimum position
delay(500); // Wait half a second
servo1.write(0); // Turn first servo to minimum position
delay(500); // Wait half a second
servo2.write(180); // Turn second servo to maximum position
delay(500); // Wait half a second
}