N64Paduino: N64 controller to Linux input device

Hi! First post here (well, second, except it wouldn't let me post links in my first post so I posted something else, heh). This is my first Arduino project of any practical use: I've written some code to get an Arduino Duemilanove to poll a N64 controller's state and send changes over the serial interface to a serial TTY in Linux where a simple daemon-like little program reads the serial data and writes input events to the kernel through the uinput system, which in turn takes care of making a standard joystick device out of it all.

I don't know if there's a special way to host/post projects for this forum, so I'll just link to my (slow, home-connection) personal HTTP server: http://vaquita.no-ip.org/n64paduino/

The electronics of it is absolutely trivial: simply connect the N64 controller as shown with two silicone rectifier diodes in series to its Vcc, or, alternatively, connect the controller's Vcc to the FTDI's 3.3V line. Both work well enough, as the controller is quite tolerant with the input voltage and the AVR has a sufficiently low threshold for high digital values. The center pin (data line) goes on digital pin 2. You can do the actual physical connection to the controller without cutting off the connector or anything of the sort: simply insert some sort of conductor into each hole on the connector. They're rather deep.

On the computer, simply compile and run n64paduino-uinput.c:

gcc -o n64paduino-uinput.c n64paduino-uinput
./n64paduino-uinput /dev/ttyUSB0

Use the appropriate terminal device, of course. Note that this program needs the uinput kernel module to be loaded, and the uinput device needs to be writable by the user running this program. Once that's done, you should see a new joystick device in /dev/input with two axes and a plethora of buttons.

I've only tested this on Duemilanove boards and first-party controllers, and I've heard third-party controllers tend to introduce significant jitter in the communication. Please, let me know if you encounter or fix any issues!

I've GPL'd the sketch (which is rather trivial anyways) and you can consider the Linux code to be in the public domain (it'd be dishonest to claim a copyright on it, as I did little more than putting together bits and pieces of code I found online). Have fun! :D