BLE Joystick on ESP32

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
francescofact
Posts: 2
Joined: Wed Nov 06, 2019 6:01 pm

BLE Joystick on ESP32

Post by francescofact » Wed Nov 06, 2019 6:05 pm

Hi everyone,
i am trying to connect a BLE joystick to my ESP32 with micropython. But i cannot find documentation for accepting connection from bluetooth device and get the commands from the joystick.
I understood that i have to start with:

Code: Select all

bt = bluetooth.BLE()
bt.activate(1)
but i cannot understand how to go on. Thank you for your help.
Francesco

User avatar
jimmo
Posts: 1465
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: BLE Joystick on ESP32

Post by jimmo » Mon Nov 11, 2019 12:08 pm

Hi,

I have a proof-of-concept of a HID keyboard for BLE, which I'm working on adding to https://github.com/micropython/micropyt ... /bluetooth

It's not nearly as simple as the other peripheral examples, but most of it is just configuration, and you end up with a "send_key" method.

It should be possible to adapt the HID keyboard demo into a HID joystick (or mouse). I'll try and remember to update this thread when I finish the keyboard example.

Post Reply