Arduino I2C LCD 1602 Display Joystick

Using the joystick with Arduino

Purpose of this tutorial:

In this tutorial we will see how to display the direction of the joystick controller on an I2C LCD 1602 Display with Arduino:

  • When the user points the joystick to the right, the word “Right” is displayed.
  • When the user points the joystick to the left, the word “Left” is displayed.
  • When the user points the joystick controller forward, the word “Forward” is displayed.
  • When the user moves the joystick to the rear, the word “Backward” is displayed.
  • When the user presses the joystick button, the word “pressed button” is displayed.

Necessary components 

  • Arduino UNO
  • Joystick
  • Connecting wires
  • I2C LCD display

The joystick is a position sensor that returns two analog values ​​representing its X,Y position. It can be used as an interface to navigate in a menu or to control an object in direction or speed. It is commonly found on joysticks for video games, remote controls for model making or even on dashboards of industrial machines.

The joystick is composed of two mechanically coupled potentiometers placed in such a way as to detect the horizontal and vertical components of the joystick. Thus the resistance values ​​of the potentiometers vary independently according to the position of the joystick. There is usually a push button that activates when you press the joystick.


To make the assembly we connect:

For joystick :

  •  5V pin to 3.3V pin of Arduino

  • GND pin to GND pin of Arduino

  • VRx pin to A0 pin of Arduino

  • VRy pin to A1 pin of Arduino

  • SW pin to pin 2 of Arduino

For LCD display:

  • VCC pin to 5V pin of Arduino

  • GND pin to GND pin of Arduino

  • SDA pin to A4 of Arduino

  • SCL pin to A5 pin of Arduino

Program Arduino:

This program allows the Arduino board to read the different values ​​of the joystick inputs and display the direction of the joystick on the I2C LCD 1602 display.

Note: You must download the LiquidCrystal_I2C library(Download).

10 commentaires

Carina 02-10-2222

Hey there are using Wordpress for your site platform? I'm new to the blog world but I'm trying to get started and create my own. Do you require any html coding knowledge to make your own blog? Any help would be greatly appreciated!

Rolland 02-10-2222

I really like your blog.. very nice colors & theme. Did you create this website yourself or did you hire someone to do it for you? Plz reply as I'm looking to create my own blog and would like to find out where u got this from. thanks

Leslee 12-09-2222

Howdy excellent blog! Does running a blog similar to this require a massive amount work? I have virtually no expertise in programming but I was hoping to start my own blog soon. Anyways, should you have any ideas or techniques for new blog owners please share. I know this is off topic but I just wanted to ask. Kudos!

Nickolas 20-04-2222

May I simply just say what a comfort to uncover a person that genuinely knows what they are discussing over the internet. You actually understand how to bring an issue to light and make it important. More people must check this out and understand this side of your story. I can't believe you are not more popular because you definitely have the gift.

Bryant 05-04-2222

I think that is among the most vital info for me. And i am satisfied reading your article. However wanna remark on few basic issues, The site taste is wonderful, the articles is really nice : D. Excellent activity, cheers

Maryellen 25-03-2222

I all the time used to study post in news papers but now as I am a user of net therefore from now I am using net for content, thanks to web.

Henry 03-01-2222

Hi every one, here every one is sharing these kinds of familiarity, thus it's pleasant to read this webpage, and I used to go to see this web site daily.

Dominga 03-01-2222

Thanks for sharing superb informations. Your site is very cool. I'm impressed by the details that you have on this site. It reveals how nicely you perceive this subject. Bookmarked this website page, will come back for extra articles. You, my pal, ROCK! I found just the info I already searched all over the place and just couldn't come across. What a great site.

Ashly 03-01-2222

Hello there, I discovered your site by way of Google while searching for a similar matter, your web site got here up, it seems good. I've bookmarked it in my google bookmarks.[X-N-E-W-L-I-N-S-P-I-N-X]Hi there, just become aware of your weblog through Google, and located that it's really informative. I am gonna watch out for brussels. I will appreciate should you continue this in future. Lots of other people might be benefited from your writing. Cheers!

Etta 16-12-2121

Hello to every body, it's my first pay a visit of this web site; this weblog includes awesome and actually excellent data designed for visitors.

Leave a comment

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Scroll to Top