Kristian Lauszus from TKJ Electronics made another contribution to USB Host Shield 2.0 library – support for Microsoft Xbox360 game controller.
Files XBOXUSB.cpp
and XBOXUSB.h
contain the main functionality. An example sketch (a screenshot of which was used for the title picture) can be found in the examples
directory. Also, check the EXTRAREADME
file for additional information as well as Kristian’s github page.
I’d like to note that Kristian is a developer of support code for Sony controllers – Dualshock 3, Navigation, and Motioncontroller – in the current version of the USB Host library. The Xbox360 code
is another nice contribution. Once again – thank you Kristian!
Oleg.
Oleg,
Those projects you’re working on and posted on this website are all awesome.
Sorry for a out of the topic questions here. (because I don’t see anywhere to post my question)
You and your team spent a lot of time working on many projects. That’s very nice of you that you share them here.
I’m just wondering, what do you do to earn a living?
I am electrical engineer/embedded developer doing consulting work. Many of my contracts are related to what I post here.
Can you use this as a passthru, so from xbox 360 controller through arduino to 360 console?
No, this library will allow to read the buttons, joystick etc. from the Xbox controller.
To connect it to a Xbox 360 you will need a device that can act as a usb device, like the Arduino Leonardo (http://arduino.cc/en/Main/arduinoBoardLeonardo) and then write some code so it shows up as a Xbox 360 controller, so it’s properly recognized by the console.
Good day Oleg
First of all I would like to thank your contributions to the community with the development of these libraries.
I’m trying to connect devices through the USB host to an Arduino Leonardo under the IDE 1.0.1. Is there a way to adapt the libraries for this version?
Thanks
It’s already working with the Arduino Leonardo. Just use the USB Host Shield as usual.
Finally is working in my arduino leonardo, the problem was that some files of the library what i donwload in zip were corrupted.
Some lines were disorganized, the solution was to compare the files one by one with the library on github. After that I got it to work correctly in the IDE 1.0.1. I do not know if it was a particular problem but if anyone has similar problems is a good place to check.
Now is working perfect with the Wired xbox360 controller, the problem now is with the Wireless setup. I am using the Microsoft Receiver and a normal Xbox 360 controller and every time i got the same Error.
Unknown Device Connected – VID: 045E PID: 0719
I check the hardware ID with the library, but everything seems to be correct. I do not know what could be wrong. any advice?
thanks
I really appreciate any help
Notice that the example is called “XBOX360USB” – currently the library only supports controllers via USB.
The problem is that I don’t have a wireless receiver. Check out my blog for more information: http://blog.tkjelectronics.dk/2012/07/xbox-360-controller-support-added-to-the-usb-host-library/
cheers Oleg,
is there a way to get an scematic how the xbox controller, the usb host shield and the arduino are wired together? 😉
I don’t get it…how do the arduino read the signal outputs, witch are transmitted form the host shield.
many thanks
cheers
J
The Xbox is plugged to USB port of USB Host shield. The shield is plugged into Arduino like any other shield, there is only one way. Details can be learned from the schematic -> https://www.circuitsathome.com/wp/wp-content/uploads/2011/02/UHS_20.pdf
thanks for your fast reply
hmm i see, i think i have to the wrong usb converter
http://physicalcomputing.at/shop/article_A-1105500/USB-Serial-Adapter-5V.html?sessid=hMIFfLMx0zAVrUAn1pvApGNEKgSdNecYxwhMtpZNjwMJuuyWPf9xPUAgpJ3VWzUR&shop_param=cid%3D1%26aid%3DA-1105500%26
thats the problem…
I noticed that Azrrael used a leonardo arduino for his xbox360 project. Is it possible to just use an leonardo and not use the USB host shield?
No, you need the USB Host Shield to communicate with the controller.
I’m new to Arduino board, and Xbox controller. My project now needs to receive signal from Xbox controller to control my robot. I wonder is that USB library also work with Arduino Uno because my project using Arduino Uno. Thanks
Yes it works for the Arduino Uno as well. There is a full list of supported boards at the readme: https://github.com/felis/USB_Host_Shield_2.0#boards.
Is there a complete examples of how to use the USB Host Sheild + Arduino+ XBOX 360 Controller ?
Yes it is available at the Github page: https://github.com/felis/USB_Host_Shield_2.0/tree/master/examples/Xbox.
Hi
i have the Usb host shield and i have a Usb 360 controller but when i try to upload sketch the XBOXUSB.h i keep getting the same error i have put the files in the library but all i get is ‘USB’ does not name a type can anyone plz help me
thank you
It sounds like you have not included the library correctly. Please see: https://github.com/felis/USB_Host_Shield_2.0#how-to-include-the-library.
I am new to the arduino family I have a wireless receiver for the xbox box Controller Can You Tell Me What Files I Need To Load In To The Arduino Uno.i Am Wanting To Use With A RC car. Thanks
Please read the readme: https://github.com/felis/USB_Host_Shield_2.0#xbox-library.
Hi, i have a Arduino Mega 2560, it’s necesary USB Shield? o i can simulate the usb jack with arduino and use the xbox adapter?
Yes you will need to have the USB Host shield in order to use the Xbox controller. The Arduino Mega 2560 doesn’t support USB host!
The example worked really well on my Uno and I’m really impressed. It will make a really cool interface for a RC controlled robot project. Thanks for sharing this.
What I am trying to do: Power on computer with xbox 360 wireless controller, then use the controller on the computer normally (with the xbox wireless receiver and its driver).
To achieve this I plan on connecting the wireless receiver to the arduino via usb shield. Then I hit the xbox button it will wake computer (either with ethernet shield with wol, or hacking into the power switch pins on the MB). Now the questions is how do I pass thru the controller commands through the arduino to the computer so it still acts as the xbox controller and uses the xbox wireless receiver driver?
Thanks in advance
is it possible to use a usb host shield 2.0 to connect a xbox360 controller to arduino? we want to make a rc car, any tips or advices what to use and how to get the controller working properly on the arduino.