wchill / SwitchInputEmulator

Nintendo Switch controller emulator that allows for serial input to control the Switch. Emulates a HORIPAD Wired Controller.
301 stars 39 forks source link

input from existing controller through arduino #11

Closed josephclaytonhansen closed 5 years ago

josephclaytonhansen commented 5 years ago

I have a generic USB controller that seems to be PS2ish era that I would like to use with a Switch. I've used this library to rewrite an Arduino UNO R3 so that it communicates with the Switch, but I don't know how to send input from my existing controller through the Arduino to the Switch. I know it's possible to use your computer as serial input with this project, but I need to use an existing controller as serial input.

wchill commented 5 years ago

This is probably not the right project for you. You need something that is capable of acting as a USB host and translating those inputs into ones for the Switch.

I wrote a Qt application that was capable of doing that (https://github.com/wchill/SwitchInputEmulator/tree/master/MultiInput) but it hasn't been updated in a while and there are no instructions. But the code required is relatively simple, it just needs to handle controller input and translate to serial.

You may also want to look into this project: https://github.com/usb-tools/Facedancer - I used it while working on Pro Controller emulation (this repo doesn't do that, only emulate a generic USB controller, though I wrote the Pro Controller implementation for Facedancer) and has some example code to modify and relay USB controller input in the way you want. Will still likely require some effort on your part though.