/* Sweep by BARRAGAN This example code is in the public domain. modified 8 Nov 2013 by Scott Fitzgerald http://www.arduino.cc/en/Tutorial/Sweep */ #include Servo servo_1; // create servo object to control servo 1 Servo servo_2; // create servo object to control servo 2 Servo servo_3; // create servo object to control servo 3 /* int pos_1 = 0; // variable to store the servo 1 position int pos_2 = 0; // variable to store the servo 2 position int pos_3 = 0; // variable to store the servo 3 position */ void setup() { servo_1.attach(6); // attaches the servo 1 on pin 6 to the servo 1 object servo_2.attach(9); // attaches the servo 1 on pin 6 to the servo 1 object servo_3.attach(10); // attaches the servo 1 on pin 6 to the servo 1 object } void loop() { servo_1.write(45); servo_2.write(45); servo_3.write(45); delay(1000); servo_1.write(90); servo_2.write(90); servo_3.write(90); delay(1000); }