//#include "BluetoothSerial.h"
//#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
//#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it
//#endif
//BluetoothSerial BT;
void setup() {
pinMode(22, OUTPUT);
Serial.begin(9600);
//BT.begin(9600);
}
void loop() {
if(Serial.available()){
char mensaje = Serial.read();
Serial.println(mensaje);
if(mensaje == 'A'){
digitalWrite(22, HIGH);
Serial.println("led encendido");
}
if(mensaje == 'B'){
digitalWrite(22, LOW);
Serial.println("led apagado");
}
}
}