//Command To App 02/02/2022 01:41:56 #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 #define BTN1 digitalRead(0)==0 #define BTN2 digitalRead(35)==0 BluetoothSerial SerialBT; void IRAM_ATTR isr() { SerialBT.println("A"); detachInterrupt(0); } void IRAM_ATTR isr2() { SerialBT.println("B"); detachInterrupt(35); } void setup() { // put your setup code here, to run once: Serial.begin(115200); SerialBT.begin("ESP32"); pinMode(0,INPUT); pinMode(35,INPUT); attachInterrupt(0, isr, FALLING); attachInterrupt(35, isr2, FALLING); } void loop() { // put your main code here, to run repeatedly: attachInterrupt(0,isr,FALLING); attachInterrupt(35,isr2,FALLING); }