Circuitpython implementation of a PlayStation 2 controller adapter for Raspberry pi/ pi pico
This project also includes a Circuitpython port of Bill Porter's PS2X library in the gamepad_with_analog_and_rumble version
- This is a python implementation of the interpreters used to read the input given by playstation controllers and use them accordingly as keyboard and mouse inputs.
After installing Circuitpython on your Device (Pico in the case of the example)
- From the adafruit circuitpython libraries copy the adafruit_hid library to your lib-folder
- Copy the contents of this repo (either one will work but with analog and rumble is reccomended ) into the main directory of the device (except for the wiring image)
- Copy the PiPyPS2 or PS2X folder into your directory from where you will refer to the PiPS2 / PS2X class
- Open game of your choice and in controller remapping press the desired ps2 key while remapping. Note that for now the analog joysticks do not work and will only move the mouse pointer
- After setting up the controller, go to Gamepad tester and try out all the buttons and see if they work.
- Open game of your choice and in controller remapping press the desired ps2 key while remapping, if any tweaking is required.
- usb_hid.gamepad is deprecated and will probably not work in the future. Also rumble will not work since the hid library does not support it.
- Credits to Vanepp for the Ps2 controller wiring image
- Bill Porter's PS2X library