Skip to content

hreintke/bluepad32

 
 

Repository files navigation

Bluepad32

discord

logo

A Bluetooth gamepad "host" for the ESP32.

Add Bluetooth gamepad support to your projects easily. Supported platforms:

Note: Only the original ESP32 and ESP32-Pico are supported, since they are the only ones in the ESP32 family to support Bluetooth BR/EDR. Newer models like ESP32-Sx, ESP32-Cx, ESP32-Hx are NOT supported since they don't support Bluetooth BR/EDR.

Features

  • Supports most, if not all, modern Bluetooth gamepads and mice (see below)
  • Fast (very low latency)
  • Small footprint
  • Uses only one core (CPU0). The remaining one is free to use.
  • C11 based
  • Open Source (see below)

Supported controllers

Supported gamepads

  • Sony DualSense (PS5)
  • Sony DUALSHOCK 4 (PS4)
  • Sony DUALSHOCK 3 (PS3)
  • Nintendo Switch Pro controller
  • Nintendo Switch JoyCon
  • Nintendo Wii U controller
  • Nintendo Wii Remote + accesories
  • Xbox Wireless controller (models 1708 and 1914)
  • Android controllers
  • Stadia controller
  • PC/Window controller
  • 8BitDo controllers
  • iCade
  • Mouse
  • And more

See: Supported gamepads and supported mice

Pre-compiled binaries

How to compile it

  1. Install ESP-IDF

    Install the ESP32 toolchain. Use version 4.4 or 5.0. Might work on newer / older ones, but not tested.

  2. Clone repo

    git clone --recursive https://gitlab.com/ricardoquesada/bluepad32.git
  3. Integrate BTStack into ESP32

    cd ${BLUEPAD32}/external/btstack/port/esp32
    # This will install BTstack as a component inside Bluepad32 source code (recommended).
    # Remove "IDF_PATH=../../../../src" if you want it installed in the ESP-IDF folder
    IDF_PATH=../../../../src ./integrate_btstack.py
  4. Compile Bluepad32

    Choose target platform (default is Unijoysticle):

    cd ${BLUEPAD32}/src
    idf.py menuconfig

    The Bluepad32 options are in: Components config -> Bluepad32 (find it at the very bottom) -> Target platform

    And compile it:

    idf.py build
  5. Flash it

    idf.py flash monitor

Support

License

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).

About

Bluetooth gamepad support for the ESP32 (mirror)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 95.5%
  • C++ 2.6%
  • Other 1.9%