adafruit / Adafruit_nRF52_Arduino

Adafruit code for the Nordic nRF52 BLE SoC on Arduino
Other
615 stars 496 forks source link

HID Gamepad Client & Central HID Gamepad example #730

Closed OstlerDev closed 1 year ago

OstlerDev commented 2 years ago

Hello! I have been working on a personal project recently and came across some missing functionality inside of the library. There was no way to connect as a Central role to an HID Gamepad peripheral. I went ahead and implemented it myself closely mirroring the Keyboard support.

This work is related to and extends upon the following old issues and pull requests.

The testing process I took is as follows:

  1. Upload the (newly updated) example at examples/Central/central_hid/central_hid.ino to an Adafruit Feather NRF52840 Express board
  2. Upload the example at examples/Peripheral/blehid_gamepad/blehid_gamepad.ino to an Adafruit Feather NRF52840 Express board
  3. View each's Serial Console to verify:
    • They both fully pair to each other
    • The Central feather is able to receive gamepad reports from the Periph feather
    • Both polling and callback functionality works from the Central role

I am fairly confident it should be ready to be merged in, however I would greatly appreciate feedback on what to change.

Changelog

Added

willwade commented 2 years ago

+1 for merging this! It looks great

someburner commented 1 year ago

bump- I see no reason to not merge this, works fine!

OstlerDev commented 1 year ago

It would be great to see this merged in! 😸

hathach commented 1 year ago

sorry for late response, I am wrapping other works and will review this as soon as I could. Thank you for your patient.