#include SoftwareSerial blueToothSerial(2,3); int c = 0; void setup() { blueToothSerial.begin(9600); pinMode(0, OUTPUT); pinMode(4, OUTPUT); } void loop() { c = blueToothSerial.read(); if(c == 1) {digitalWrite(4, HIGH); digitalWrite(0, HIGH); delay(500); } else if (c == 0) {digitalWrite(4, LOW); digitalWrite(0, LOW); delay(500);} // turn the LED OFF by making the voltage LOW else{} }