Archive

Posts Tagged ‘macro’

Xbox Macro Controller - Howto

May 3rd, 2009

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.

Wii Classic with USB end

Wii Classic with USB end

Peilcan Case with added USB port

Pelican Case with added USB port

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

Wii Classic Connections

Wii Classic Connections

I found this info at TodBots site.  He made a Nunchuck adapter, which easily connects to the Arduino.

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.

A,B,X,Y, buttons soldered to wires

A,B,X,Y, buttons soldered to wires

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.

Arduino Output

Arduino Output

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.

little button pushers

little button pushers

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:

Xbox Macro.pde

WiiClassic.h

Wire.h

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.

All Done

All Done

Well there you have it, I hope this is helpful for those who want to DIY, feel free to email me (ohbowz@gmail.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.

Joe Making Stuff , , , ,

XBox Macro Controller

April 1st, 2009

I’ve been working on this for a few weeks now, and thanks to the helpful people at the Arduino forum, I’ve finally finish. This little box allows you to play XBox games with a Wii classic controller, (it’s limited in that and not worth doing so) but that’s not why I made it.

The purpose is Programable Macros. You can have one button set off any combination of button presses you want. The reason it’s a Wii controller is it works nicely with the Arduino.

macro-illustrated1

The setup is pretty simple, I took a wireless Xbox controller apart, soldered wires to all the contact points for the Dpad and the “X,Y,A,B” Buttons.  Each button is connected to a small transistor, which has its base recieving input from the Arduino.  Thanks to a lot of help from the good people at the Arduino forum, I was able to have the Arduino press the Xbox Controllers buttons when input was recieved from the Wii classic controller.  All unused buttons on the classic controller were assigned to special combinations.

It comes in handy if your not fast enough to do combination moves in Street Fighter.  I wouldn’t use this for “evil” but it was fun to make.

Here’s how you MAKE it!


Joe Making Stuff , , , ,