In this Instructable you will learn how to program Arduino to control Servo motor from a Play Station 2 controller with the help of Visuino - an easy to use graphical development environment for Arduino.
Please note that the annotation on some of the pictures in this Instructable will work correctly on some browsers only after you click on the image to expand it.
Please note that the annotation on some of the pictures in this Instructable will work correctly on some browsers only after you click on the image to expand it.
Please make sure you click on the image to see the annotation showing the correct spot on the image!
You will need:
The Cytron PS2 Shield used in the demo has configuration jumpers for the Arduino UNO serial, or to use software serial.
Using the main hardware serial is problematic as the same serial is used to program the Arduino and for debugging.
Arduino Mega has 4 serials, and it is recommended to use a hardware serial whenever one is available.
To connect the PS2 Shield to one of the additional serial ports of the Arduino Mega, you can use jumper wires.
1. Disconnect the jumpers from the PS2 Shield.
2. If you have Male to Female jumper wires connect directly the pins of the jumper marked on the second picture with the red circles to the Arduino Mega pins marked with red ellipses in the first picture.
The RX pin (right on the PS2 Shield picture) should be connected to the pin 19 (RX1) of the Arduino Mega (first picture)
The TX pin (left on the PS2 Shield picture) should be connected to the pin 18 (TX1) of the Arduino Mega (first picture)
If you have only male-male jumper wires as in my case, you can use the jumper cap to make the connection as shown in picture 3
To start programming the Arduino, you will need to have the Arduino IDE installed from here: http://www.arduino.cc/.
Please be aware that there are some critical bugs in Arduino IDE 1.6.6.
Make sure that you install 1.6.5 or 1.6.7, otherwise this Instructable will not work!
The Visuino: https://www.visuino.com also needs to be installed.
Congratulations! You created your own Arduino program to control Servo motor with a PS2 Shield in just few minutes!
Also attached is the Visuinoproject, that I created for this Instructable. You can download and open it in Visuino : https://www.visuino.com