#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() {
Serial.begin(9600);
//BT.begin("ESP32test");
pinMode(23, OUTPUT);
}
void loop() {
//if(BT.available()){
if(Serial.available()){
///char mensaje = BT.read();
char mensaje = Serial.read();
if(mensaje == 'A'){
digitalWrite(23,HIGH);
}
if(mensaje == 'B'){
digitalWrite(23,LOW);
}
}
}