#include<SoftwareSerial.h>
SoftwareSerial bluetooth(10,11);
int ledGRN = 4;
int ledBLU = 5;
int BluetoothData;
void setup()
{
bluetooth.begin(9600);
pinMode(ledGRN, OUTPUT);
}
void loop()
{
if(bluetooth.available())
{
BluetoothData=bluetooth.read();
if(BluetoothData=='1')
{
digitalWrite(ledGRN,1);
bluetooth,println("LED IS ON");
}
if(BluetoothData=='0')
{
digitalWrite(ledGRN,0);
bluetooth,println("LED IS OFF");
}
}
delay(100);