const int ledPin1 = 25; //"BLUE" const int ledPin2 = 26; //"GREEN" const int ledPin3 = 27; //"RED" //the pin that the LED is attached to - change this if you have a separate LED connected to another pin int incomingByte; // a variable to read incoming serial data into void setup() { // put your setup code here, to run once: // initialize serial communication: Serial.begin(9600); // initialize the LED pin as an output: pinMode(ledPin1, OUTPUT); pinMode(ledPin2, OUTPUT); pinMode(ledPin3, OUTPUT); } void loop() { // put your main code here, to run repeatedly: // see if there's incoming serial data: if (Serial.available() > 0) { // read the oldest byte in the serial buffer: incomingByte = Serial.read(); // if it's a capital H (ASCII 72), turn on the LED: if (incomingByte == 'H') { digitalWrite(ledPin1, HIGH); } // if it's an L (ASCII 76) turn off the LED: if (incomingByte == 'L') { digitalWrite(ledPin1, LOW); } } }// This code is to test the LED's ability to come on and off prior to color or gesture