Showing Texts on LCD with ESP32

Adi H
3 min readFeb 17, 2020

--

How to use LCD with ESP32? Is it difficult? Do we need special skills to do that? What is the LCD capable of? In this story, I will answer all of that questions.

What we need are:

  1. ESP32
  2. Breadboard
  3. LCD (16x2 I2C)
  4. Jumper cables
  5. LCD-I2C connector

First, we have to connect LCD to ESP 32 using soldered LCD-I2C connector and female to female jumper cables. We already had it soldered when we bought it.

Before using the code, we downloaded LiquidCrystal_I2C library and put it on the Arduino IDE library folder.

To connect ESP32 to LCD, we used serial window scanning to determine the I2C address.

Using the address at 0x27, we uploaded the code to display “Hello, World!” text on LCD.

At first try, the LCD did not show anything. We tried to plug and unplug the cable. We also tried reuploading the code to ESP32. Then we asked our friend and they told me that we had to configure potentiometer located behind the LCD. After doing that, we successfully displayed the text.

The next project is displaying scrolling text on the LCD. We used this code below.

The code just worked nicely! This is our video showing scrolling text on LCD.

The final project is displaying custom text on LCD, such as emoji and other kind of character. We created the character in array of bytes, that told which pixel to turn on and off.

And this is the result. Quite nice isn’t it?

Okay, that’s our experience with LCD on ESP32. Thank you!

--

--