N64 Controller Serial Protocol Tutorial
There are tutorials out there for using an controller with an Arduino, but using the more complicated N64 controller and its analog joystick has a definite appeal. If you have an Arduino around and don't want to buy an Adaptoid, this instructable will make it possible to play emulated games in Project 64 with your Ardunio and an N64 controller. Is this hard? / Will it damage my stuff?
This will not modify your controller in any way, and the wiring is extremely simple, so if you do everything carefully there should be no risk to your controller, and you can unhook it at any time to use with a N64 console. What you will need: - $30 - free - free 3 pieces of wire - free (I hope) USB cable. The first thing you need to do is connect your Arduino to the controller The controller only uses three leads: +3.3V, signal, and ground. Looking directly at the plug, ground is farthest left, signal is in the middle, and +3.3V is on the right. Using the wire, connect ground and +3.3V to the respective pins on the Arduino, and connect the signal lead to the Digital 2 pin on the Ardunio. NOTE: If you have other code on your Arduino, you should disconnect the controller and upload the new code from the next page t o the Arduino before powering it up with the controller attached.
Connect the Arduino Connect the USB cable and the Arduino will have power. This code was written by me, with parts of the N64Arduino file based on assembly code written by Andrew Brown. ZIP Archives: The two Zip files below contain the code needed to run the Arduino and then to interpret the data it sends to the computer. The N64Arduino file needs to be compiled in the Arduino IDE, and the N64Controller runs in Processing 1.0. N64Arduino This PDE file should upload to your Arduino and run without a hitch if you have everything connected properly.
N64 Controller Serial Protocol Tutorial Download
It simply queries the N64 controller for data on the buttons and Analog stick and sends it back to the computer over the serial port. It is easy enough to modify, for example, you could use the methods from this file to query a controller and use the data to run an Arduino robot instead of transmitting it back to the computer. N64Controller This is a Processing 1.0 project that takes the data transmitted by the Arduino and converts it into keyboard presses that you can map to an emulator like Project 64. You might need to change the line String portName = Serial.list1; to match the your Arduino, it should be either Serial.list0; Serial.list1; or Serial.list2; EDIT: Add 'import java.awt.Robot;' 'import java.awt.AWTException;' 'import java.awt.event.InputEvent;' to the code if you are using Processing 1.1 N64Controllermouse This is the same as N64Controller, except that the analog stick controls your mouse, not the arrow keys.
N64 Controller Serial Protocol Tutorial Online
A and B are right and left click, respectively. To activate the mouse, press the start button on your controller. Attachments. Before you can use the controller, the Arduino needs to be connected and running the code you downloaded in the last step, and Processing 1.0 needs to be open with the N64Controller program running. Test it out in Notepad, pressing the A button should type an A, B should type a B, etc. So now you have a working controller (hopefully) and you want to play some games. Downl0ad PJ 64 Set Key Mappings Start PJ 64 and open the settings menu first (Ctrl+T).
Change the input controller to N-Rage's direct input. Open the 'Configure Controller Plugin' menu and set the mappings using the controller. Start Playing! You should be all set to go now!
Download some ROMs and start enjoying your homebrew N64 adapter.
What i want to do: Read Serial information from a gamecube controller and use it on PC games (And anything Else) E.G. The Problem: How can i time my arduino code so that it can read the serial information? How do i then read that information?
Extra Information: Halfway down this page is timing and protocol information This is code for an arduino Due, which sadly dosen't work for Uno I think i should be fine with everything else i need to do to get this to work, its just the reading of the serial i need help with. Sadly, I don't think this is possible for an Uno.
The timing requirements are just too strict. The only thing I can possibly think of that might have a fighting chance is the input capture unit, but it might take too much processing in between bits to be feasible. Have you considered using the Wii Classic Controller instead? All the Wii Remote's peripherals are I2C interface, which is much easier to do for an Uno. I've controlled a Nunchuck successfully with my Arduino, a Classic Controller shouldn't be much harder.
Comments are closed.