This is my first Demo on the LEDs
Arduino code
#include <Servo.h>
Servo myservo0;
Servo myservo1;
//int lefttoplidopen = 120;
//int lefttoplidclose = 60;
//int righttoplidopen = 120;
//int righttoplidclose = 60;
int pos;
void setup() {
myservo0.attach(3);
myservo1.attach(4);
Serial.begin(9600); // initialize serial communications
}
void loop() {
if (Serial.available() > 0) { // if there's serial data available
int inByte = Serial.read(); // read it
if (inByte == 1) {
myservo0.write(60);
myservo1.write(180);
} else if (inByte == 2) {
myservo0.write(180);
myservo1.write(60);
} else {
}
delay(200); // waits
}
}