1) Objective:

In this project, we will use Arduino UNO to drive Joystick, Joystick KY-023 has (X,Y)2 axis analog output, (Z)1 button digital output. The value of each axis will shown on the serial monitor of IDE in real time.

2) Parts and devices:

Parts
Qty.
arduino uno
1
Joystick KY-023
1
USB Cable
1
Dupont Line
Some

3) Circuit graph

arduino uno
Joystick KY-023
5V
VCC
GND
GND
A0
VRx
A1
VRy
D3
SW

4) Download sample code from following link

Download joystick.ino sketch and load it into Arduino.

5) Result:

Open the serial monitor, move the joystick and then you can see the information output