Are you interested to work with Analogue joystick, here I will show you how to interface and work joystick with Arduino board.
The joystick is similar to two potentiometer connected together, one for the vertical movement(Y - Axis) and another for the Horizontal movement(X - Axis).
The Potentiometer are variable resistance, It provide us with varying voltage depending on their rotation.
This Joystick also Contains one small push Button ,We can also use that Push Button for various Purpose
If you have any Trouble Comment or Contact us : @technical_tamizha_official
Watch Video Tutorial :
Materials Needed For this Project :
Arduino
Joystick
LED's
Breadboard
wires
GND
VCC
VRx -> Variable Resistance x
VRy -> Variable Resistance y
SW -> Switch / Button
Connections:
*VCC -> 5v
*GND -> GND
*VRx -> A1
*VRy -> A2
*SW -> 7
NOTE : you can connect VRx and VRy to any of the Arduino Analogue pin.
SW pin to any Digitalm Pins
Joystick with Serial Monitor :
Connect your Joystick to Arduino board. Now lets find the value of X and Y axis of joystick.
(connections are mentioned Above)
Upload the Program 1 to the Arduino Board - Download Program
After uploading program open serial monitor in your Arduino software ,There you can find your Joystick Values.
If there is no value printed in serial monitor check your circuit connection.
If nothing shown in serial monitor ,Select the correct Band(9600) ,This option will be present bottom of the serial monitor.
Control LED's With Joystick:
controlling LED's with Arduino joystick is very simple, we know the joystick x , y and Switch value so it is easy to control LED's with that value
(connect all 5 LED's to your Arduino board)
After finishing your Circuit Connection ,Upload the Program to your Arduino Board - Download Program2
The LED will go High when you operate the Joystick.
If you have any Trouble Comment or Contact us : @technical_tamizha_official
Comments