-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

BBC Micro:bit in Practice
By :

A joystick is a very commonly known device in the gaming world. The working principle of a joystick is to monitor the variance on the x-axis and y-axis. In a conventional joystick, two potentiometers are connected on both the x and y-axes in 2D. The variation in the potential is observed with the help of a driver circuit. The initial position of a joystick is in the center. Based on the position of the joystick, the variance is calculated using the driver circuit. The driver circuit will calculate the value to locate its actual position – that is, up, down, right, and left. It also has a push button on the center position, which can be programmed. The joystick has five pins:
In Figure 9.12, the connection of a joystick can be observed: