A Bluetooth gamepad "host" for the ESP32.
Add Bluetooth gamepad support to your projects easily. Supported platforms:
- Arduino + ESP32 boards: further info, template project
- Arduino + boards with the NINA coprocessor: further info, library
- CircuitPython + boards with the AirLift coprocessor: further info, library
- Or in custom boards like:
- Unijoysticle v2, to play games on the C64
- Unijoysticle v2 for the Amiga
- ULX3S, an FPGA console
- Supports most, if not all, modern Bluetooth gamepads (see below)
- Fast (very low latency)
- Small footprint
- Uses only one core (CPU0). The remaining one is free to use.
- C99 based
- Open Source (see below)
- Sony DualSense (PS5)
- Sony DUALSHOCK 4 (PS4)
- Sony DUALSHOCK 3 (PS3)
- Xbox One S
- Nintendo Switch Pro
- Nintendo Wii U
- Nintendo Wii
- Android gamepads
- PC/Window gamepads
- 8BitDo
- iCade
- And more
See: Supported gamepads
-
Install ESP-IDF
Install the ESP32 toolchain. Use version 4.2. Might work on newer / older ones, but not tested.
-
Clone repo
git clone --recursive https://gitlab.com/ricardoquesada/bluepad32.git
-
Integrate BTStack into ESP32
cd ${BLUEPAD32}/external/btstack/port/esp32 ./integrate_btstack.py
-
Compile Bluepad32
Choose target platform:
# Choose target platform: unijoysticle, airlift, nina, etc... export PLATFORM=unijoysticle
And compile it:
cd ${BLUEPAD32}/src make -j
-
Flash it
cd ${BLUEPAD32}/src make flash monitor
Bluepad32 is open source, licensed under Apache 2.
However Bluepad32 depends on the great BTStack library. Which is free to use for open source projects. But commercial for closed-source projects. Contact them for details. They are very friendly + helpful (I’m not affiliated with them).