I'm planning on buying this adapter for a PS2 controller so I can hook it up to my Arduino: http://www.lynxmotion.com/p-73-ps2-controller-cable.aspx
. I will then use this library to interface with it: http://www.billporter.info/playstation-2-controller-arduino-library-v1-0/
In the example code that came with the library, some of the pins are hooked up to digital IO pins that support PWM. Here is the line:
ps2x.config_gamepad(13,11,10,12, true, true); //setup pins and settings: GamePad(clock, command, attention, data, Pressures?, Rumble?) check for error
On the Uno, pins 10 and 11 support PWM.
Upon doing a little more research, I found this other guide: http://www.wegmuller.org/arduino/Arduino-Playstation_gameport.html
. The author hooks up 'command' to a PWM pin, but 'attention' to a non-PWM pin.
Is it just a coincidence that 'command' and 'attention' are plugged into PWM pins in the first example? My best guess is 'yes', since I doubt that the PS2 controller communicates with an analog signal. I ask this question because I'm creating my own Arduino shield for a special project, and I want to get it right the first time.
Thank you in advance,