USB Joystick library for Nano 33 BLE

Hello!

Since there was no library around for emulating a USB joystick on Nano 33 BLE -board, i ended up making one. It is still 'work-in-progress' but basic functionality for sending axis-values and pressing and releasing buttons work. This is usually enough for most simple projects.

The basic API is designed to be mostly compatible with the ArduinoJoystickLibrary by MHeironimus which many, including me, have been using for USB joystick on Leonardo, Micro and Due boards. Most used functions like 'setAxis' and 'pressButton' should have identical function, and code ported from the boards mentioned earlier should work with small adjustments.

Current limitations:
-Only one joystick supported at a time.
-No support for hats.
-Hardcoded to include 6 axis (X, Y, Z, Rx, Ry, Rz)
-Hardcoded to include 64 buttons.
-Lots of other hardcoded stuff which should be set by the user.
Hopefully these will be remedied later if i can figure out how the underlying USB system works...

Tested with Windows 10 and Linux as USB-host platform.
The code is based on the MBED-OS USBHID framework, so it might work with other MBED-OS based boards, but this has not been tested.

The code can be found at GitHub - jamakoiv/ArduinoNano33BLEJoystick

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.