Playstation 2 controller with Raspberry Pi

This tutorial will show how to use the Playstation 2 Controller (PS2) with the Raspberry Pi. We use the Arduberry to adapt the shield to the Raspberry Pi.Playstation 2 controller with Raspberry Pi

Step 1: Hardware Required

  1. Raspberry Pi
  2. Arduberry
  3. Dexter Industries Playstation 2 Controller Shield for Arduino
  4. A Playstation 2 controller or a similar clone (Please Check the wiki for the compatible clones)

Step 2: Stack the PS2 controller

Stack the PS2 controller connector to the PS2 shield and slide the shield on to the Arduberry. Slide the Arduberry on to the Raspberry Pi and power it on.

Playstation 2 controller with Raspberry Pi serial port setting

Step 3: Setting up the Software

Clone the library from the Github Repository to /usr/share/Arduino/libraries.

cd /usr/share/arduino/libraries
sudo git clone  https://github.com/DexterInd/Arduino-PS2X.git

Rename the library from Arduino-PS2X to Arduino_PS2X

sudo mv Arduino-PS2X/ Arduino_PS2X/

Step 4: Upload the code to Arduberry

Open Arduino, and open the example PS2X_Example from the Arduino_PS2X folder.

 


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top