I want to know if it is possible to use the keyboard library with the ESP32 but I have not found information regarding that
No, that library is for board with ATmega32u4 or SAMD MCUs.
With ESP32 you could easily implement a BLE HID device, check a tutorial like this for example.
edit:
The library used in the example
But I have problems when connecting the esp32 via Bluetooth and I wanted to see if it was possible to do it via USB. use BLE keyboard library but connection fails
I wanted to use the ESP32 in this case because I don't have Arduino nano
It's possible for sure, but not with the USB port used for flash programming: that port is connected to an USB/TTL converter. You need to emulate a HID device.
After a quick googling, I've found this library which should do what you are looking for.
With this I will be able to use the ESP32 in a USB keyboard? or will it still continue via bluetooth?
The library it's called EspTinyUSB ![]()
Check the readme in the repo and you will find all info needed.
Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advice on) your project
See About the Installation & Troubleshooting category.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.