dankraus / padawan360

Arduino sketches for R2-D2 remote control with Xbox 360 Controller
BSD 3-Clause "New" or "Revised" License
62 stars 47 forks source link

Cheap Xbox 360 Wireless Controllers (Radio 2.4Ghz) #8

Open bretbenz84 opened 4 months ago

bretbenz84 commented 4 months ago

Having bought a cheap controller that did not work, I discovered that they behave as if they are wired USB controllers with a simple radio in between. Thus it does not work the same way, but with simple edits and a change of the library it works like a charm. I'd like to contribute my version that works with these $20 controllers.

Change the include for xboxrecv.h to #include

Change line 170 to XBOXUSB Xbox(&Usb);

Change line 242 to if (!Xbox.Xbox360Connected) {

Any further xbox function call remove the , 0 from that line. Since it's not one of four controllers (default 0) and just a single USB controller this gets it to work.

dankraus commented 4 months ago

Nice find @bretbenz84 ! Would you like to open up a Pull Request to include an additional sketch with these changes? Please include information on the readme as well about this addition, which controllers it’s expected to work with as well

bretbenz84 commented 4 months ago

Yes I would absolutely love to share my version. It took me 5 hours to figure it out. I can also update the readme.

On Apr 9, 2024, at 9:12 AM, Dan Kraus @.***> wrote:

Nice find @bretbenz84 https://github.com/bretbenz84 ! Would you like to open up a Pull Request to include an additional sketch with these changes? Please include information on the readme as well about this addition, which controllers it’s expected to work with as well

— Reply to this email directly, view it on GitHub https://github.com/dankraus/padawan360/issues/8#issuecomment-2045578068, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWOVR7UBZ5ME65CUSCD3OBDY4QHNBAVCNFSM6AAAAABFYBCFU6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBVGU3TQMBWHA. You are receiving this because you were mentioned.