#include //string to store incoming message from bluetooth SoftwareSerial blueToothSerial(0,1); int c = 0; void setup() { blueToothSerial.begin(9600); // serial communication started pinMode(8, OUTPUT); // LED connected to 5 pin } //-----------------------------------------------------------------------// void loop() { c = blueToothSerial.read(); //Conduct a serial read if(c == 1) { digitalWrite(8, HIGH); // turn the LED ON by making the voltage HIGH } else if (c == 0) { digitalWrite(8, LOW);} // turn the LED OFF by making the voltage LOW else{ } }