Hi, in this tutorial we’ll try to interface a PS2 wireless controller with Arduino UNO board, it is very interesting since all the controller’s buttons would be inputs for the Arduino board and not only that but also wireless, using 2.4GHz Radio Frequency communication protocol, which can be very useful to control robots, vehicles, servos…
I bought this controller with A servo dedicated board for 30 USD, you can get the controller/Receiver much cheaper, but don’t forget that these cheap things have some problems (you can see it in the video), the sensitivity is not that good comparing it with the original controller, but that’s not a big deal for the moment.
You can learn a lot about this controller visiting this website: billporter.info
Since here we don’t talk too much lets get to the wiring.
Considering from which side you are observing this is the order I followed, the pins #3 and #8 don’t have a connector at all, also we’re not using the pin #9.
This is my wiring sorry it’s not very esthetic.
Wiring with the usual LCD i2c screen, I used with the code I made.
Libraries and codes:
The code I’ve used in the tutorial: The first one you’ll find it in the library, it shows different functions you can use such as reading the analog stick values, detect if a button is pressed, released or being held…., also it detects which type of controller you are using or showing you an error if there is one.
The second code just takes few functions and shows the value or the buttons that are being pressed on the screen, here I only associated printing on lcd screen for every function, but for you, you can control servos, dc motors, leds… overall it’s just an example for the tutorial.
Hope you like it, and if you have any problem you can contact me.
Automation and Electrical Engineer, Electronics amateur trying to share my little projects.