
#include <SoftwareSerial.h>
#include <LiquidCrystal.h>


SoftwareSerial BT(8,10);
LiquidCrystal ld(2,3,4,5,6,7);
void setup() {
  // put your setup code here, to run once:
BT.begin(9600);
Serial.begin(9600);
digitalWrite(3, HIGH);

ld.begin(16,2);
ld.print("bluetooth working");
}

void loop() {
  // put your main code here, to run repeatedly:
if(BT.available())
{
  char C =BT.read();
  if(C=='A'){Serial.println("APAGADO");}
  if(C=='P'){Serial.println("PRENDIDO");}
  
}
}
