Connect Arduino 20×4 LCD I2C Display in 5 Minutes Easily

I will show how to Connect Arduino 20×4 LCD I2C Display in 5 Minutes Easily. We will use 20 by 4 display in this tutorial because it has 20 characters each line. If you wish to buy, then buy this version. The process of connection will be the same for all the version.

To see the output from Arduino, we need to connect LCD display with it. There is mainly two version of LCD display is available in the market. One is 16X2 display which has 2 lines & another one is 20X4 display which has 4 lines.

The LCD module can be connected to an Arduino board in 3 ways:

  1. Direct connection from the LCD module to the Arduino board without POT.
  2. Direct connection from the LCD module to the Arduino board with POT.
  3. LCD Module and Arduino board connected through an I2C Module.

I will show the 3rd process in this post.

To connect without any I2C module, follow this post

Connect LCD Display with Arduino without I2C Module & POT

Components Used:(Click to Buy)

Connection Setup Arduino 20×4 LCD I2C

Connection setup is very easy compared to direct connection. We have to connect only 4 pins using the following diagram.

Arduino 20x4 LCD I2C

Arduino 20×4 LCD I2C Library

First of all, we have to download and import the Arduino-LiquidCrystal-I2C-library.
You can also search this library inside Arduino IDE Manage Library.

Code Explain of Arduino 20×4 LCD I2C

In line 8, we are setting the the I2C address, Display character no & line no.

LiquidCrystal_I2C lcd(0x27, 20, 4)

Here the default address is 0x27. We are using 20×4 LCD display here. In line no 41 we have done a trick to clear the only last line. We have displayed 20 blank character i.e 20 times space bar in the output display.

Arduino Sketch for Arduino 20×4 LCD I2C

Output Arduino 20×4 LCD I2C

Arduino 20x4 LCD I2C
Share with Friends
0 0 votes
Rating
guest
0 Comments
Inline Feedbacks
View all comments