void setup() Serial.begin(115200); bleKeyboard.begin();
This makes your ESP32 appear as a standard Bluetooth keyboard to PCs, tablets, and phones. | Microcontroller | Bluetooth | Works as Keyboard | Complexity | |----------------|-----------|------------------|-------------| | ESP8266 | No | No (Wi‑Fi only) | High (workaround) | | ESP32 | Yes (Classic + BLE) | Yes (BleKeyboard library) | Low | | Arduino + HC‑05| Yes (Classic) | Yes (with SoftwareSerial) | Medium |
If you need a true Bluetooth keyboard, skip the ESP8266 and get an ESP32 . It’s easier, more reliable, and widely supported.
void loop() if(bleKeyboard.isConnected()) bleKeyboard.print("Hello from ESP32!"); delay(2000);