Lesson 16 Analog Joystick Module
Lesson 16 Analog Joystick Module
Overview
Analog joysticks are a great way to add some control in your projects.
In this tutorial we will learn how to use the analog joystick module.
Component Required:
Component Introduction
Joystick
where you got the module from. The thumb stick is analog
We can use the analog Arduino pin to read the data separately from the X/Y/K pins, Or put
it together. The K pin is connected to ground, when the joystick is pressed down, and is
floating otherwise. To get stable readings from the K /Select pin, it needs to be connected
to VCC via a pull-up resistor. The built in resistors on the Arduino digital pins can be used.
For a tutorial on how to activate the pull-up resistors for Arduino pins, configured as inputs
Connection
Schematic
Wiring diagram
We need 9 connections to the joystick.
“Y and X” are Analog and “K” is Digital. If you only need Any one switch then you can
Code
After wiring, please open the program in the code folder- Lesson 16 Analog Joystick
Module and click UPLOAD to upload the program. See Lesson 3 for details about
When the joystick is in the resting position or middle, it should return a value of about 512.
Open the monitor then you can see the data as blow:
Click the Serial Monitor button to turn on the serial monitor. The basics about the serial