#include #include Servo TKMicroServo1; Servo TKMicroServo2; TKDigital switch1(I0); TKLed led(O0); int asend; int asend1; void setup() { Serial.begin(9600); TKMicroServo1.attach(O1); TKMicroServo2.attach(O5); TKMicroServo1.write(0); TKMicroServo2.write(0); } void loop() { int val = switch1.read(); if (val == HIGH) { led.on(); delay(1000); asend = 1; TKMicroServo1.write(90); delay(15); if(asend=1) { delay(1000); TKMicroServo2.write(179); asend = 2; } } if(val == LOW) { led.off(); TKMicroServo2.write(0); asend1 = 1; if(asend1 = 1) { delay(1000); TKMicroServo1.write(0); asend1 = 2; } } delay(50); }