loading

I have found several ways of connecting an NES controller to your computer for use as an emulator gamepad but none seemed to be simple and compatible with what I had on hand.

This one only works with Arduino Leonardo, Micro, and Due: https://gist.github.com/j-mcc1993/8202522

This one requires updating firmware: https://github.com/Grouflon/arduino-nes-controlle...

Some other ones just seemed outdated or required completely converting it to USB or just had overcomplicated issues.

I made a sketch that is compatible with the processing sketch used for an N64 controller in this instructable here:

https://www.instructables.com/id/Use-an-Arduino-wit...

This is working well with the emulators that I have tested it on.

I made a blog post for this on my unknown, unvisited blog, but I figured I should make an instructable so anyone interested can find it easier.

https://computationalphysmatronics.wordpress.com/2...

Step 1: Wires

Only five of the seven pins on the NES controller connector are used, one is ground and one is +5V, leaving three interesting ones.

This explains the pinout and timing:

http://www.mit.edu/~tarvizo/nes-controller.html

You can wire directly to the holes in the controller connector but I used the mated part that is connected to the board inside the NES case to get a more secure connection (See Picture).

I have the "pulse", "latch", and "data" pins going to pins 6, 7, and 8 on the arduino, but you can change it in the code to whatever pins you want.

Step 2: Arduino and Processing

Run the arduino sketch and then the processing sketch and that's it! The image of the N64 controller and the .picasa.ini file are part of the processing sketch. Just put those three files in a folder together.

The processing sketch is the same as the one in the N64 controller instructable with the addition of explicitly importing packages that aren't automatically imported in newer versions of processing.

Pay attention to this: "You might need to change the line String portName = Serial.list()[1]; to match the your Arduino, it should be either Serial.list()[0]; Serial.list()[1]; or Serial.list()[2];"

Just load up your preferred emulator and configure the input settings.

EDIT: Instructables got mad at me for having an image I didn't create. I don't know if the processing program will be fussy about not having an image in the folder with it so here's a link to the three files together (image, .ini file, .pde file). You could probably just name a random picture N64 Controller.jpg or it might not care at all, I don't know. Just in case, here's the link.

https://www.dropbox.com/sh/k9upeif77zrsdll/AACvHLZ6ANmZ9b3LDDP-0H5Ka?dl=0

<p>Very cool! Thank you for sharing this great info.</p>

About This Instructable

2,657views

28favorites

License:

More by combsbt:Using an NES controller for emulators with Arduino and Processing 
Add instructable to: