-
I want to use a Waveshare Pi Pico Zero to connect two standard NES controllers to a computer over a single USB port. I found this this Teensy targeted NES_to_USB sketch and was able to use it with arduino-pico with minor modifications. However, that only works for a single NES controller. It looks like this [MHeironimus ArduinoJoystickLibrary](https://github.com/MHeironimus/ArduinoJoystickLibrary/ library supports straight-forward multiple HID Joystick devices. Unfortunately it seems that particular Joystick library only supports ATmega32u4 based Arduino boards. Is there any way I can do the same with arduino-pico? Is it something that should be supported "out of the box" that I'm missing or a feature that could be added? Otherwise, I'm happy to try and experiment with editing HID descriptors etc, but from what I've managed to understand from reading the source of arduino-pico and Adafruit TinyUSB the configuration of the HID descriptors is hard-baked into the TinyUSB initialization code that is called by arduino-pico before any of my sketch's code runs, so I don't know how to hook up the custom HID descriptors. An example of how to get started would be much appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
The main core only supports 0 or 1 gamepad. Nothing technically restricting more than one report, it's just not a normal mode of operation and I think it'd be a little complicated to expose the request for 2 gamepads in a way the core would be able to use before the sketch starts. I believe you can use the Adafruit_TinyUSB library for this because IIRC you control when USB comes up (vs. as part of the core boot in the main repo). You might want to ask in the Adafruit repo about it. |
Beta Was this translation helpful? Give feedback.
I managed to get it working, wrote it up on arduino stack overflow: https://arduino.stackexchange.com/questions/93577/expose-two-hid-joystick-devices-with-single-rp2040-board-waveshare-pi-pico-zero/