Let's Make Robots!

An Arduino and a Playstation 1 Controller

I'm having trouble interfacing a playstation 1 controller with the arduino. the project will eventually be to use it  wirelessly to control a simple robot.

I was wondering if anyone has actually gotten the PSX Library on the arduino website to work and if so how, even if it turns an led on and off.

here are some links


PSX library


some people whove tried to interface using the psx library and their own code





Pinout used



thanks a lot elyas


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

 Thanks for all the help you've given RobotFreak i have finally managed to get my controller to work.

1. Firstly i was using  incorrect libraries, they were for the analog controller (no joysticks) i had a dualshock 1.

2. I found a library called GPSX which is compatible with dualshock i think, which requires minimal extra hardware just 2 resistors.

 Circuit and code @ http://pspunch.com/pd/article/arduino_lib_gpsx_en.html

  The buttons work but i have not tried the joysticks yet.

 I'll be happy to help if any one requires assistance.

  Thanks Elyas

Thanks for pointing that out but it didnt work. i'm beginning to believe that my setup is wrong the example sketch says pins 2,3,4,5 (digital i think)

some where else someone says 10,11,12,13 and some where else, it says analog 0,1,2,3 ive tried all 3 but to no avail

The example script says: pin 2=data,3=command,4=attention,5=clock, that is the point. If you change the script you can use other pins, but you can't use the analog pins.

How do you connect the controller to the Arduino?

Here is a fritzing connection plan.

I don't have a playstation 1 controller, but I've installed the PSX lib and get some errors when compiling the example.

You need to change one line in Psx.h:

#include "WConstants.h"


#include "WProgram.h"

than the example compiles. Hope this may help.





thanks, i experienced this problem too and after a lot of googling around i found the answer as you mentioned .

the example compiles fine, after that it just doesn't do anything like blink the led when a button is pressed like its supposed to, i think.

In the example only Button psxR2 will turn on the LED.