The question below describes how to set up an Arduino as an HID (Human Input Device -- like a keyboard, mouse, etc.). How can I set up an Arduino as a wireless HID?
I'm flexible as to the wireless format. Bluetooth, USB receiver, or any other format is acceptable.
-
1This has been done with ESP32. If you connect a bluetooth module to the Arduino, that might work as well.Thomas Weller– Thomas Weller2020年07月12日 06:35:52 +00:00Commented Jul 12, 2020 at 6:35
-
@ThomasWeller, this looks like what I need. If you make it into an answer I'll accept it.Mark Harrison– Mark Harrison2020年07月13日 00:04:08 +00:00Commented Jul 13, 2020 at 0:04
1 Answer 1
I'm not sure for Arduino, but it has been done with ESP32. If you have not yet spent the money into a Bluetooth module for Arduino, you'll find that the ESP32 is not expensive either.
You can find the code on Github. The author uses a TinyPico because it's pin compatible with one of his earlier projects. IMHO, any ESP32 should do as well.
The key thing is to
#include <BleKeyboard.h>
the ESP32 BLE Keyboard library that you need to download and install. That library comes with example code that should be easy to adapt to your needs.
You can program the ESP32 in Arduino IDE, but you need to add support for the boards by adding a URL to the board manager.
Have fun with the project. It sounds very interesting. Maybe I try that myself.