User Manual

77
Lesson 15 Joystick PS2
Introduction
There are five operation directions for joystick PS2: up, down, left, right and press-down.
Components
- 1 * Raspberry Pi
- 1 * Breadboard
- 4 * Jumper wires (Male to Male, 2 red and 2 black)
- 1 * Network cable (or USB wireless network adapter)
- 1 * PCF8591
- 1 * Joystick PS2 module
- 1 * 5-Pin anti-reverse cable
- Several Jumper wires (Male to Female)
Experimental Principle
This module has two analog outputs (corresponding to X and Y coordinates) and one digital
output representing whether it is pressed on Z axis.
In this experiment, we connect pin X and Y to the analog input ports of the A/D convertor so
as to convert analog quantities into digital ones. Then program on Raspberry Pi to detect the
moving direction of the Joystick. The schematic diagram: