NicoHood / HID

Bring enhanced HID functions to your Arduino!
http://www.nicohood.de
MIT License
2.37k stars 409 forks source link

Notes on Gamepad support #265

Closed SukkoPera closed 3 years ago

SukkoPera commented 3 years ago

Here's something for the Gamepad wiki page:


The Gamepad API supports 32 digital buttons, 4 16-bit axes (X, Y, RX, RY), 2 8-bit axes (Z, RZ) and 2 D-Pads/Hat switches.

As usual, there are both single- and multi-report versions of the API.

The single-report version supports up to 4 Gamepads, named Gamepad1, Gamepad2, Gamepad3 and Gamepad4. It will use 1 endpoint for each gamepad.

The multi-report version only suppors a single Gamepad, unsurprisingly named Gamepad.

All objects have the same API, which is straightforward:

General

Digital Buttons

Axes

D-Pads/Hat Switches

Please refer to the Gamepad example to see the API in action.

NicoHood commented 3 years ago

Thanks a lot! https://github.com/NicoHood/HID/wiki/Gamepad-API

DRSDavidSoft commented 5 months ago

I wish the wiki was open to edits by public people