Xbox Macro Controller – Howto
You can see in the video that the controller functions like a normal controller, but when you press the shoulder buttons and the “+,-” buttons you get combo moves that would normally require more work.
So here is how it works… Wii Classic controller inputs into the Arduino which outputs to an Xbox controller and a button is pressed.
Input: The reason I’m using a Wii Controller is because of the library that was already available on the Arduino site. When all was done I wanted to put everything in a nice Pelican Case, so I replaced the end of the controller with a usb cable, put a USB port in the pelican case and wired it to the Arduino inputs.
The USB plugs made it easier to connect the controller without opening up the Pelican. The pin layout should go as follows.
SDA -> AnalogIn pin 4
SCK -> AnalogIn pin 5
V+ -> 5v
Gnd -> Gnd
OUTPUT: We are going to connect to an XBox Wireless controller. You will need a special screwdriver to open it up (TT8). Inside, each button has two contact points (+,-) There is a coating over the metal contacts that will need to be scrapped off before you can solder to it. I only used the Dpad, the X-Y-A-B buttons, “start” and the “BigX” to turn on the controller. Make note of which wire is Positive and Negative. I found this out by using a multimeter, while the controller is on, touch the red and black to the buttons contacts. If the display reads a negative value then you know that the black end of the multimeter is on a positive contact.
I also have the controllers V+ and GND connected to the Arduinos 3v and GND.
Now we need to have the Arduino press these buttons, we do this using little transistor. I found these at Radioshack ,they are NPN transistors and they do the job.
When we want the Arduino to press a button, we have the DigitalPin Out set to “HIGH”, this causes the transistor to close the switch, and the XBox controller reads a button press. The resistor that goes between the Arduino and transistor is important, if it is too low or too high, weird things can happen or nothing at all. 8kohms worked for me, but in another project I’m currently working on I needed 40kohm. I set this up for all 8 button using pins 5-12. The “start” and “BigX” button are wired to buttons on the Pelican case since they are not needed for gameplay.
Once that is all setup, you need to give the Arduino the code. I have it setup so the Classic Controller works like a normal controller, but the shoulder buttons (L, R, Lz, Rz) and the +,- buttons have macro settings. When playing Street Fighter I press the “+” button, and the Arduino presses Down, Forward, Punch. (Hadoogan)
Here is the code I used:
I received a lot of help from people at the Arduino Forum since I’m not a programmer. The WiiClassic.h is modified from the original to allow multiple button presses at the same time, and held buttons. The code is setup for playing Ken right now. It can be customized for any character (or any game). Something I would like to do is add a little toggle switch, that lets you select your character. You can also take it a step forward and add the Xbox controllers analog sticks, Lb, Rb, and L,R for more possibilities.
Another thing worth noting, in Street Fighter the moves are direction specific. I made the right shoulder buttons work for Ken facing left, and the left shoulder buttons for Ken facing right, the “+,-” are also mirrored. It may be easier at some point to have the analog sticks on the Classic controller contain all the macros, then you have a stick for left and right.
Well there you have it, I hope this is helpful for those who want to DIY, feel free to email me (email@example.com) with any questions. I originally made this as a learning experience, and to defeat my friends. I don’t know how kindly XBox Live would respond to something like this being used, so as a disclaimer, I am not responsible for its potential evil.