#include #include #define F_CPU 16000000UL ; Servo a_servo; // create servo object to control a servo Servo b_servo; // create servo object to control a servo Servo c_servo; // create servo object to control a servo Servo d_servo; // create servo object to control a servo Servo e_servo; // create servo object to control a servo Servo f_servo; // create servo object to control a servo int pos_a = 90; // variable to store the servo position int pos_b = 20; // variable to store the servo position int pos_c = 20; // variable to store the servo position int pos_d = 150; // variable to store the servo position int pos_e = 60; // variable to store the servo position int pos_f = 130; // variable to store the servo position int pos = 0; // variable to store the servo position void setup() { a_servo.attach(3); // attaches the servo on pin 9 to the servo object b_servo.attach(5); // attaches the servo on pin 9 to the servo object c_servo.attach(13); // attaches the servo on pin 9 to the servo object d_servo.attach(9); // attaches the servo on pin 9 to the servo object e_servo.attach(6); // attaches the servo on pin 9 to the servo object f_servo.attach(10); // attaches the servo on pin 9 to the servo object } int a = 0; void loop() { if (a == 0){ delay(2000); e_servo.write(pos_e); delay(2000); d_servo.write(pos_d); delay(2000); c_servo.write(pos_c); delay(2000); f_servo.write(pos_f); delay(2000); b_servo.write(pos_b); delay(2000); a_servo.write(pos_a); delay(2000); //////////////////////////////////////////////////////////////////////// pos_e = 75; e_servo.write(pos_e); delay(3000); pos_a = 110; a_servo.write(pos_a); delay(3000); pos_e = 60; e_servo.write(pos_e); delay(3000); pos_f = 60; f_servo.write(pos_f); delay(3000); pos_a = 90; a_servo.write(pos_a); delay(3000); pos_e = 50; e_servo.write(pos_e); delay(3000); a = 1; } }