#include "BluetoothSerial.h"
BluetoothSerial SerialBT;
void setup() {
Serial.begin(115200);
SerialBT.begin("ESP32_Device1");
Serial.println("Device 1 Bluetooth Started. Waiting for connection...");
}
void loop() {
if (SerialBT.available()) {
String receivedData = SerialBT.readString();
Serial.println("Device 1 Received: " + receivedData);
SerialBT.println("Device 1 Acknowledged: " + receivedData);
}
delay(20);
}