1 2-axis and a key button
The joystick proposed here is much known between makers. It provides two axis and a key button and every axis is actually a potentiometer: that means axis data is analogue and we need to use ADC to read its positioning.
Potentiometers are provided of springs so, without forcing, wipers are approximately positioned in the centre of the two resistive elements. As this device is very simple to use, it is not easy find a related datasheet. Indeed, for the most of the applications, it would be useless. Anyway, joystick used in this demo is a very cheap one marked as “Keyes_SJoys” (See Fig.1).
2 Schematic and pin out
Our device has 5 pins:
- GND, connection to ground;
- +5V, should be meant as connection to VCC;
- VRx, X-axis wiper ;
- VRy, Y-axis wiper;
- SW, switch terminal.
Note that pins are almost the same for every 2-axis Joystick you can buy online. There are some variant which have two or no switch. continue reading…