Arduino Tutorial: 20×4 I2C Character LCD display with Arduino Uno from


Dear friends welcome to another Arduino Tutorial! Today we are going to learn how to use this 20×4 character LCD display with Arduino. There is a lot to cover so let’s get started!

Hello guys, I am Nick and welcome to a channel that is all about DIY electronics projects with Arduino, Raspberry Pi, ESP8266 and other popular boards. Subscribe to the channel now if you don’t want to miss any future videos. In this video we are going learn how to use this inexpensive character LCD display with Arduino. After we learn how to use the display we are going to build something useful. A simple real time clock. Let’s start.

I discovered this display some time ago on It drew my attention because it inexpensive, it costs around 7$, it is big, and it uses the I2C interface. Since it uses the I2C interface it is extremely easy to use with Arduino. We only need to connect two wires. I needed a big, easy to connect display for prototyping some projects and the only display that was using the I2C interface was this tiny OLED display. Now we have a big I2C display to use in our projects! Great!


Arduino Uno:

20×4 LCD:

DS3231 RTC:

Small Breadboard:

Jumper Wires:


Power Bank:

Full disclosure: All of the links above are affiliate links. I get a small percentage of each sale they generate. Thank you for your support!

As we said before we only need to connect 4 wires. I connect GND to Arduino GND, Vcc to Arduino 5V, SDA pin to Analog Pin 4 on the Arduino Uno and lastly SCL pin to Analog Pin 5 of the Arduino Uno. That’s it! Our display is ready to use.

We now need to download the library for the display. I am using the NewLiquidCrystal library. You can find a link for the library in the description below. After installing the library we are ready to write our first sketch. We are going to develop a simple sketch that is going to display some text on the display. Let’s see how to achieve that.


📥 New LiquidCrystal:

📥 DS1307 Library:

As you can see the code of this first project is very simple. All we need to do is to include 2 libraries, and set the I2C address of the display here. Now we can initialize the display, we set the cursor to the desired position and print some text. The setCursor command works like this. The first argument is the column and the second one is the row. So, in this line of code we tell the cursor to move to column 3 and row 0 and with the following command we print the text “Hello YouTube”. We do the same for all the other lines of text. As you can see using the display is very easy, so this display is great for quick prototyping and ideal for beginners to Arduino.


Quiz of Knowledge Android Game

You can download my latest Android Game which is called Quiz of Knowledge here:


Arduino Datalogger:
Arduino Weather Station Project:
Arduino Nokia 5110 LCD Display:
Arduino OLED display tutorial:
DIY Arduino:

——————– is a Youtube channel and website which is dedicated in developing high quality videos about DIY hardware and software projects. In this channel we develop projects with Arduino, Raspberry Pi, we build robots and simple electronic circuits. Check out our website as well for more information:


Never miss a video:



  1. So often when I look for tutorials for a project or for a specific new part I want to mess with I get video's of this channel and they're always super useful. Thanks so much for these video's!

    (I'd also love to see Midi projects on this channel. Or maybe arduino synthesizers.)

  2. When I power the lcd from the Audrino using the usb cable from the computer everything works great BUT when I use a separate external 5volt power supply for just the LCD and the usb cable for the audrino it doesn’t work. Why would that be?

  3. Γεια σου Νικο, εδω μπορείς να παρεις μια ιδεα τι εκανα με την δικια μου οθόνη. Συντομα θα ανεβάσω και video

  4. Great video! I found one of these screens in my parts box and want to do a display for my car showing various readings, ie. Battery voltage, oil temp etc

  5. Nice video.
    just one thing, could you explain ths line
    LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); How do you know it's 0x27 and after how do you find 2,1,0,4… ?

  6. To make this work on a Mega 2560 just leave the code the same and move the Analog 4 (SDA) to SDA 20 and Analog 5 to SCL 21.

  7. Thank you very much, great videos and tutorials. I learned very good things from you.
    I used the DS1302 real time module ( the one I have at the moment) and it's work precisely 🙂

  8. I found your video useful, I am going to build a signal generator and I want to use the 2004 display in my project

  9. Whenever I verify my code, I repeatedly get the message that "'x' was not declared in this scope." I've gotten "'createCustomCharacters' was not declared in this scope," and "'printDate' was not declared in this scope."

  10. My LCD screen has 20 pins and I cant find the data sheet anywhere HELP ( TW28642270b03) also i dont know how to connect it


Please enter your comment!
Please enter your name here