Show Posts
Pages: [1]
1  Using Arduino / General Electronics / Re: Do I need to hook any PlayStation 2 Controller pins to PWM pins? on: September 06, 2011, 07:00:22 pm
Ah, how could I have missed that!

I'm going to assume that the PS2X library uses software SPI. Reading through the source code (way over my head), it doesn't import the SPI library but it does a lot of operations with registers.

Thanks for your help!
2  Using Arduino / General Electronics / Do I need to hook any PlayStation 2 Controller pins to PWM pins? on: September 06, 2011, 04:12:55 pm
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:

Code:
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,
Pages: [1]