UPDATE 22-12-2014
Instructables user mattpbooth has updated the code and is hosting it on github:
https://github.com/mattpbooth/ArduinoNESController…
Thanks Matt!
UPDATE 03-12-2011
Replaced a println with print (derp).
UPDATE 01-12-2011
Remade all code from scratch.
Remade ‘ible code section; Now includes a ‘Processing COM port config for dummies’
Ladies and gentlemen, I proudly present 8bit pleasure.. yours for the grabbing! Whether you use GNU/Linux, Mac OS X, or Windows the USB NES controller is compatible.
Will this in any way alter the controller?
Nope, the controller will stay the same so you can still use it on a real NES
But I don’t have an arduino ;_;
You can use the parallel port: http://hellalame.com/nes/nes_controllers.html
Buy an arduino: http://hellalame.com/nes/nes_controllers.html
Or a retrozone NES kit: http://hellalame.com/nes/nes_controllers.html
Step 1: Ingredients for some awesome controller soup
You will need:
A NES controller
An Arduino
A USB cable type B
Something you can use as a Casing
and some wire..
Optional: NES port http://www.parallax.com/Store/Components/Other/tabid/157/CategoryID/32/List/0/SortField/0/Level/a/ProductID/522/Default.aspx
Arduino software http://arduino.cc/
Processing http://processing.org/
Step 2: How to connect the arduino to the nes controller
With some wire connect the pins according to the texts on both pictures..
You could also use the controller port from a NES (a broken one, don’t waste a working one).
You want something vaguely similar to the last picture.
Step 3: Code
UPDATE 22-12-2014
Instructables user mattpbooth has updated the code and is hosting it on github:
https://github.com/mattpbooth/ArduinoNESController
Thanks Matt!
Hey guys, I’ve completely rewritten the code and it should work now flawlessy.
The only adjustment you might need to make is to the Processing Sketch; you need to adjust which COM port it should use.
To do this please follow these steps carefully!
Steps
1 ) Disconnect the Arduino if it’s connected.
2 ) Run the Processing sketch, it WILL(!) display an error.
3 ) Check the console (black box with text at the bottom of processing)
4 ) In the console will be a list of active COM ports;
Serial list
WARNING: RXTX Version mismatch
Jar version = RXTX-2.2pre1
native lib Version = RXTX-2.2pre2
[0] “COM3”
End of serial list
5 ) As you can see currently COM3 is active and is the first COM port at the moment (denoted by “[0]”)
6 ) If the Processing sketch ran without displaying an error, press the stop button.
7 ) Hook up the arduino.
8 ) Run the Processing sketch again.
9 ) Check the console for active com ports;
Serial list
WARNING: RXTX Version mismatch
Jar version = RXTX-2.2pre1
native lib Version = RXTX-2.2pre2
[0] “COM3”
[1] “COM5”
End of serial list
10 ) As you can see COM5 suddenly appeared in the list after we connected the arduino.
11 ) We now know that the arduino has COM5 and is the second COM port (denoted by “[1]”)
12 ) We know adjust our code;
Replace:
arduino = new Serial(this, Serial.list()[?], 9600); // ATTENTION!!!
With:
arduino = new Serial(this, Serial.list()[1], 9600); // ATTENTION!!!
13 ) Save the program.
14 ) Load the arduino sketch unto the arduino.
15 ) Start the Processing sketch!