DualShock 1 / PS1 Controller Questions

Hello,

I have a PS1 controller, and I was wondering how to interface it with my Arduino, like what pins go were, etc. I have metered all the pins, and matched to color codes of the wires.

I'd like to get the joysticks, and apply that to my tank base, but I can't do anything without a controller.

Thanks, -AKSoapy29

http://www.arduino.cc/playground/Main/PSXLibrary

Here , there are some links to some discussions on the forum:

http://letsmakerobots.com/node/18599

I hope they will be helpful.

Bye, fab.

Awesome! I will try and see if I can get it to work, then if I do, post pictures or video :) Can't wait to try it.

This library found on that site doesn't work. I'm running 0022 or 1.0 of the ide, and both say it has an error compiling. I'm using Uno also. What version of the ide do I need to work with the library and the Uno?

Library (Scroll to PS2 controller library): http://pspunch.com/pd/library_en.html

If you can help, that would be greatly appreciated.

Soapy29: This library found on that site doesn't work. I'm running 0022 or 1.0 of the ide, and both say it has an error compiling.

Based on this error you need to.... err.. wait. What's the error?

Oh, sorry. This is everything in the output window:

In file included from C:\Documents and Settings\vti\Desktop\arduino-0022\arduino-0022\hardware\arduino\cores\arduino/WProgram.h:6,
                 from interface_pad1.cpp:23:
c:/documents and settings/vti/desktop/arduino-0022/arduino-0022/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected unqualified-id before 'double'
c:/documents and settings/vti/desktop/arduino-0022/arduino-0022/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected `)' before 'double'
c:/documents and settings/vti/desktop/arduino-0022/arduino-0022/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected `)' before 'double'

you said ps1 in the first post but posted a link to ps2 library....

if it is ps2 library you need use Bill Porters library. http://www.billporter.info/playstation-2-controller-arduino-library-v1-0/

I used it last week on a lynxmotion track base and lynxmotion arm. worked great.

Well I believe it's a Dualshock 1 or 2 controller. I opened it up, and it had to vibration motors. It also has 2 joysticks. I tried his library, and it's very confusing. So I think PS1 controllers and PS2 controllers have no difference, really. Am I wrong?

Bill's library won't upload. Some error about not in sync.

Soapy29: So I think PS1 controllers and PS2 controllers have no difference, really. Am I wrong?

The protocol (SPI) is the same. PS2 supported analog sensitive buttons which PS1 did not.

Soapy29: Bill's library won't upload. Some error about not in sync.

What error about being "not in sync." The error you posted indicates a syntax problem in one of the header files.

That was an error from the GPSX library. This is the error I get from Bill's PS2X library:

avrdude: stk500_getsync(): not in sync: resp=0x30
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

I got it to work with Bill Porter's PSX2 library! Now I need to figure out how to write the code. I figured out that I have a DualShock 1 controller. Do I need 9 volts ac or dc for the rumble to work?

It works! The robot is driven using the two joysticks on the controller. The robot is underpowered. How would I fix this? All I'm using is a 5Volt voltage regulator, and a 7.2Volt 3000MaH NiMH Vex Robotics battery. The robot must be powered by battery, and it will also power:

  • Arduino Uno
  • DualShock 1 Controller
  • 2 Vex continuous rotation servos

This is my first working robot that I built using my Arduino, and the first time I have interfaced a PS1 controller with my Arduino. I first built the tread base to be small. Small enough to be the size of the Vex PIC microcontroller. I named it the Crab, because it fit the robot well. :)