So I want to attempt to write the device driver myself.
In Perl, using the Linux::Joystick, I can see all the events, buttons etc., and I learned that each event is 8 bytes long.
I made a small sketch to read data from serial in and hooked up the gamepad to the serial input of the Duemilanove. However, when I then move the controls on the gamepad, there is no serial traffic at all (tx/rx leds stay off).
No being a hardware guy, I'm a bit at a loss here.
Can anyone point me in the right direction to read serial input from the gamepad?
try looking on the game console forums since that is what it looks like that connects to. Just look for others who might have built some other device to connect and not necessarily just that one device since game console hardware interfaces are standardized.
So far, I've only seen the Wii Nunchuck( I2C interface ) and an old Nintendo controller connected to an Arduino but there might be others. You could also try searching in these forums for the name of the console( PS3, PS2, Xbox ) the device you have is designed for.
One more thing, you seem to say that you have connected the device up to a Linux box and read data via some Perl module. That would mean it is a USB device of some sort. The Arduino does not do USB and would have to emulate a USB Host interface to get data out of that using the default cabling. Because you are not a hardware guy, you might be over your head here because most likely you are going to have to open the device, examine what the data looks like going onto the USB chip in there and then wire something up to connect to your Arduino. Maybe you could mount an Arduino inside the controller and connect each button/switch up to the Arduino and get what you want that way?
Since it is USB you have a problem. USB is master slave with most devices like your gamepad being slaves. The problem is the Arduino is not a master and you will need some way to create a master and I am not up on how that can be done but FTDI has a chip called the Vinculum that works with some devices, take a look.
@ MikMo: he controller has a USB connecor at the end of the cable.
I am not sure that the device sends serial data; the Perl 'Joystick.pm' module that I investigated (which is a good interface to this gamepad) does not talk directly to the gamepad either: it uses what it reads in the device file, /dev/js0.
@ Dougl/Franklin: I googled for a couple of hours already grin. Nobody seems to have tweaked/hacked this device... You may be right about it being a USB slave, which accounts for it not sending any serial data. I've read somewhere on the Arduino site about creating a master interface oneself, and I'll look into that. No sure if I should tackle a low level project like that...