From the course: Learning Arduino: Interfacing with Analog Devices
Unlock the full course today
Join today to access over 24,200 courses taught by industry experts.
Joystick module - Arduino Tutorial
From the course: Learning Arduino: Interfacing with Analog Devices
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
What are analog devices?2m 3s
-
Understanding analog-to-digital converters1m 50s
-
(Locked)
Exploring our temperature sensor (TMP37)2m 29s
-
(Locked)
Understanding how to interpret the sensor values2m 55s
-
(Locked)
Interpreting the sensor values1m 16s
-
(Locked)
Wiring up the temperature sensor57s
-
(Locked)
Coding to read the temperature sensor4m 56s
-
(Locked)
LDR (light-dependent resistor) sensor1m 36s
-
(Locked)
Using a voltage divider with our LDR3m 43s
-
Wiring up our LDR circuit1m 26s
-
(Locked)
Coding to read the LDR circuit3m 56s
-
(Locked)
Joystick module2m 9s
-
(Locked)
Wiring up our joystick1m 9s
-
(Locked)
Coding the joystick circuit4m 47s
-
-
-
-
-