ESP32 C3 Super Mini - LCD 20x4
In this ESP32 C3 Super Mini LCD 20x4 I2C tutorial, we'll show you how to display text on a 20x4 LCD screen using I2C communication. This beginner-friendly guide makes it easy to add a large display to your ESP32 projects.
In this tutorial, you'll learn:
- What an LCD 20x4 I2C display is and how it works
- How to wire the LCD 20x4 to ESP32 C3 Super Mini
- How to write code to display text on the LCD
- How to position text on the 20-character, 4-row display
- How to use the DIYables LCD I2C library

Hardware Preparation
| 1 | × | ESP32 C3 Super Mini | |
| 1 | × | USB Cable Type-A to Type-C (for USB-A PC) | |
| 1 | × | USB Cable Type-C to Type-C (for USB-C PC) | |
| 1 | × | LCD 20x4 | |
| 1 | × | Jumper Wires | |
| 1 | × | Optionally, DC Power Jack |
Or you can buy the following kits:
| 1 | × | DIYables Sensor Kit (18 sensors/displays) |
Additionally, some of these links are for products from our own brand, DIYables .
Buy Note: Alternatively, you can assemble the LCD I2C display using LCD 1602 Display and PCF8574 I2C Adapter Module.
Overview of LCD I2C 20x4
LCD I2C 20x4 is a liquid crystal display module that shows 20 characters per line across 4 rows using simple I2C communication.
- Display Capacity: 20 columns × 4 rows (80 characters total)
- Interface: I2C (only 2 wires needed for data)
- Operating Voltage: 5V
- I2C Address: Typically 0x27 (may vary by manufacturer)
- Backlight: Built-in LED backlight (blue or green)
- Contrast: Adjustable via onboard potentiometer
- Beginner-Friendly: Much easier wiring than parallel LCD displays
- Perfect For: Displaying sensor readings, menus, and multi-line messages
Pinout
The LCD 20x4 I2C module has just 4 pins, making connections simple:
- GND: Ground pin - connect to GND (0V)
- VCC: Power supply pin - connect to 5V
- SDA: I2C data line - serial data communication
- SCL: I2C clock line - serial clock signal

LCD Coordinate
Understanding the LCD coordinate system helps you position text precisely:
- 20 columns: numbered 0 to 19 (left to right)
- 4 rows: numbered 0 to 3 (top to bottom)
- Cursor positioning: Use setCursor(column, row) to place text anywhere
- Top-left corner: Position (0, 0)
- Bottom-right corner: Position (19, 3)

Wiring Diagram
Here are the wiring connections for the ESP32 C3 Super Mini and LCD 20x4 I2C display:
- USB-Powered Setup: When powering ESP32 via USB port

This image is created using Fritzing. Click to enlarge image
- External Power Setup: When powering ESP32 via Vin pin

This image is created using Fritzing. Click to enlarge image
※ NOTE THAT:
When powering the ESP32 C3 Super Mini through the USB port, it is possible to power the LCD display using the VBUS pin of the ESP32 C3 Super Mini, eliminating the need for an external power source. However, it is important to note that this approach may not work as the power provided by the VBUS pin might be insufficient for the proper functioning of the LCD display.
| LCD I2C | ESP32 C3 Super Mini |
|---|---|
| VCC | 5V |
| GND | GND |
| SDA | A4 |
| SCL | A5 |
How To Program For LCD I2C
The DIYables_LCD_I2C library makes programming the LCD 20x4 I2C display simple and straightforward for ESP32 C3 Super Mini projects.
The code performs these key steps:
- Includes the DIYables LCD I2C library for easy display control
- Creates an LCD object with I2C address and display dimensions
- Initializes the LCD and turns on the backlight
- Positions the cursor at specific coordinates
- Prints text messages to each of the four rows
Include the Library
Declare LCD Object
Initialize the LCD
Set Cursor Position
Print Text Message
※ NOTE THAT:
The I2C address of LCD can vary according to the manufacturers. In the code, we used 0x27 that is specified by DIYables manufacturer
ESP32 C3 Super Mini Code
Detailed Instructions
- New to ESP32 C3 Mini? Complete our Getting Started with ESP32 C3 Mini tutorial first to set up your development environment.
- Set up Arduino IDE: If this is your first ESP32 C3 Super Mini project, follow the Arduino IDE setup tutorial to configure your environment.
- Connect the hardware: Wire the LCD 20x4 I2C to ESP32 C3 Super Mini following the wiring diagram above.
- Plug in USB cable: Connect the ESP32 C3 Super Mini to your computer using a USB Type-C cable.
- Open Arduino IDE: Launch the Arduino IDE software on your computer.
- Select your board: Choose ESP32 C3 Super Mini and the correct COM port from the Arduino IDE.
- Install the library: Click the Library Manager icon on the left sidebar of Arduino IDE.
- Search for library: Type "DIYables LCD I2C" in the search box.
- Install DIYables library: Find the DIYables_LCD_I2C library by DIYables and click Install.

- Copy the code: Paste the example code above into Arduino IDE.
- Upload the code: Click the Upload button to transfer code to your ESP32 C3 Super Mini.
- View the display: Check the LCD screen - you should see text on all four rows.
- Experiment: Try changing the text content and cursor positions to customize the display.
- Pro Tip: If nothing appears on the LCD, adjust the small potentiometer on the back of the I2C module to increase contrast until text becomes visible.
Application Ideas
Here are practical projects you can build using the ESP32 C3 Super Mini with LCD 20x4 I2C display:
- Weather station displaying temperature, humidity, pressure, and forecast
- Smart thermostat showing current temperature, target temperature, mode, and schedule
- Multi-sensor data logger displaying readings from multiple sensors simultaneously
- Menu-driven system for controlling home automation devices
- Real-time clock with date, time, day of week, and alarm status
- Audio player interface showing song title, artist, album, and playback time
- Network monitor displaying IP address, connection status, signal strength, and data usage
Video Tutorial
Watch the video below for a visual walkthrough of this project.
...VIDEO Z5z8MnJXb_s
Challenge Yourself
Take your ESP32 C3 Super Mini LCD skills further with these progressive challenges:
- Easy: Display your name on the first row and your favorite quote on rows 2-4
- Easy: Create a countdown timer that displays seconds remaining on the LCD
- Medium: Read temperature from a DHT11 sensor and display it with a custom degree symbol
- Medium: Build a scrolling text marquee that moves messages across the screen
- Advanced: Create a multi-screen menu system that cycles through different information displays every 5 seconds
- Advanced: Design a real-time system monitor showing WiFi status, uptime, memory usage, and sensor data