// Bluetooth light connection #include int val; // Ender the variable "val" void setup() // the setup function tuns once when you press reset or power the board { Serial1.begin (9600); pinMode (26, OUTPUT); // initialize digital pin 13 as an output. } void loop() // the loop function runs over and over again forever { if (Serial1.available ()) // If "Serial" is available, { val = Serial1.read (); //hten "val" is equal to "Serial.read" if (val == '1') //If "val" is equal to 1, { digitalWrite (26, HIGH); // then on the 13th pin the voltage is applied (the LED lights up) } if (val == '0') // If "val" is 0, { digitalWrite (26, LOW); // then the 13th pin does not feed the voltage (The LED goes out) } } }