Classic Controller usb hid gamepad #11
Replies: 6 comments 16 replies
-
It should be pretty straight forward to combine the CircuitPython Adafruit-HID library with the Classic Controller examples from this library. I am happy to help if you have questions. What microcontroller are you using? |
Beta Was this translation helpful? Give feedback.
-
QT PY RP2040 (w) QT breakout adapter |
Beta Was this translation helpful? Give feedback.
-
I created a gist for now that maps the classic controller to a USB HID game pad. https://gist.github.com/jfurcean/6d15effe779367c8d51dddab12ba4cb9. I tested it on Linux and it works as expected, but had some issues on Mac OSx so your mileage may vary. Let me know if you have any questions. |
Beta Was this translation helpful? Give feedback.
-
I have a third party version (0 or 31). Are you saying that I just need to reverse the |
Beta Was this translation helpful? Give feedback.
-
Yeah, I didn't account for the analog triggers in my code or the device descriptor because my device doesn't have them. On the MacOS side it looked like I had an additional 6 buttons and an additional joystick axis that weren't usable and threw off the results. This is the tool I tested with on both mac and linux - https://gamepad-tester.com/. I am not sure the best way of trouble shooting on the MacOS side either. I posted in the Adafruit Discord, but haven't heard anything. I will try some more testing tonight. |
Beta Was this translation helpful? Give feedback.
-
same here - and the negatives worked as well for the joys. I’ll test out the rest this weekend - funny thing about the v1 classic controller is the triggers are analog to begin, then a digital button press (same as a Gamecube controller). I don’t think the code will matter as even though they are shared the signals come from different components of the board. |
Beta Was this translation helpful? Give feedback.
-
Greetings - enjoying your work here and looking to build my own usb adapters to use my older classic controllers as straight-usb gamepads in Dolphin, and probably nes/snes classic controllers in OpenEMU.
You have code examples published for making nunchuks into usb devices using your driver (and the Adafruit hardware), but do you have any for your classic controller driver? The necessary USB HID descriptor seems pretty standard and is published elsewhere, but I haven’t been able to locate any code for the communication itself - I assume because very few people would choose to use a classic controller instead of something already natively usb-compatible. Or that I’m late to the game and people who have already did this did it in Arduino long ago. Being new to this in general (let alone Python itself) writing all that myself from scratch seems like a pretty daunting task.
thanks a lot.
Beta Was this translation helpful? Give feedback.
All reactions