felis / USB_Host_Shield_2.0

Revision 2.0 of USB Host Library for Arduino.
https://chome.nerpa.tech
1.79k stars 780 forks source link

how do you/can you send controller button presses to the gaming console with it? #769

Open sl0sh opened 1 year ago

sl0sh commented 1 year ago

I see it will read and display the interaction with the controller? Can the shield transmit button presses and stick position to the gaming console via an arduino script? How would someone go about doing that? Thanks

Vortetty commented 7 months ago

The shield just acts as a usb host, which means it controls devices. To go the other way you need a board with the ability to act as an hid device such as an Uno R4/R4 minima, leonardo, micro, or almost any of the teensy boards. Then you can use a library like Xinput (xbox 360/windows, compatible boards listed in readme, as for console connectivity it will likely only work on hacked consoles), or the Arduino joystick library (this one is for ATmega32u4 boards only), or USB Joystick (this one is for the teensy boards only).

these all really only work for pc or hacked consoles, as consoles have security chips to attempt to prevent third party controllers without licensing, and these security chips have not been openly cracked thus cannot be emulated.