From the course: Learning Arduino: Interfacing with Analog Devices

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Joystick module

Joystick module - Arduino Tutorial

From the course: Learning Arduino: Interfacing with Analog Devices

Start my 1-month free trial

Joystick module

- [Instructor] A joystick is a familiar component that we use with Arduino, as a set of analog inputs. It is used in many applications, like robot control, game input, and a tilt control. The joystick moves in three directions, x, and y, and also in the z direction by pressing on the joystick. In our joystick, the x axis is aligned with the pins on the board. The module produces a voltage varying between zero, and five volts. Depending on the direction you move the joystick, it produces about 2.5 volts from both x and y outputs, when it is in the resting position. Internally, the joystick consists of two potentiometers, one for each axis. This is how the schematic diagram for a joystick looks. And as mentioned before the Arduino uses a 10-bit Analog to Digital Converter, so the values between zero and five volts, will be mapped from zero, to 1023. For the x axis when moving toward the pin side, the values approach zero. And when you move the joystick to the other side, the values…

Contents