https://github.com/controllercustom/dinput_tinyusb
Arduino TinyUSB DInput gamepad controller for Xbox Adaptive Controller
https://github.com/controllercustom/dinput_tinyusb
Last synced: 11 months ago
JSON representation
Arduino TinyUSB DInput gamepad controller for Xbox Adaptive Controller
- Host: GitHub
- URL: https://github.com/controllercustom/dinput_tinyusb
- Owner: controllercustom
- License: mit
- Created: 2024-11-25T21:32:12.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-05T18:37:37.000Z (over 1 year ago)
- Last Synced: 2025-04-02T00:38:44.930Z (about 1 year ago)
- Language: C++
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Arduino TinyUSB DInput Gamepad Controller for Xbox Adaptive Controller
The USB HID DInput gamepad has the following controls.
|Control |Description
|--------|---------------
|X |8 bits, 0..255, left stick
|Y |8 bits, 0..255, left stick
|Z |8 bits, 0..255, right stick
|RZ |8 bits, 0..255, right stick
|Hat |8 way hat switch/direction pad
|Buttons |12 buttons
The HID report has been carefully chosen so it works with the Xbox Adaptive
Controller (XAC). The X,Y axes map to the XAC left joystick. The Z,RZ
axes map to the XAC right joystick. The hat switch maps to the XAC dpad.
The buttons map to XAC buttons.
The XAC firmware must be updated to the June 2024 version or newer for all
features to work. Use the Xbox Accessory app to update the firmware. The app
runs on Xbox console and Windows. On Windows, install the free app from the
Microsoft Store.
This has been tested on the following boards.
* Raspberry Pi Pico
* Raspberry Pi Pico W
* Raspberry Pi Pico 2W
But it should work on other RP2040 boards. And with some changes it should work
on other boards supported by the Adafruit TinyUSB library such as
SAMD21/SAMD51, nRF52840, etc.
For Arduino Leonardo, Pro Micro, and Micro boards see https://github.com/controllercustom/dinput_pluggable
For ESP32-S3 boards see https://github.com/controllercustom/dinput_ESP32
Install this library by downloading a zip file from this repo. Use the IDE
"Add .ZIP library" option.
## Button Mapping
The XAC default button mapping for external USB joystick buttons is unexpected.
See this video on how map buttons so they are useful.
https://www.youtube.com/watch?list=PLGr-X28QXcrsVR17qugfIKH1C1aAaD5yM&v=gm4w4qXaDm8