
How to Use Two or More LCD1602-I2C Modules with Arduino
This project demonstrates how to connect and control two or more LCD1602 displays with I2C modules to a single Arduino. This setup is highly versatile and opens up a range of possibilities for displaying data across multiple screens.
Here are a few project ideas using multiple LCDs:
- Displaying sensor readings from different locations on separate screens.
- Creating a multi-screen information display for a project.
- Building a menu-driven interface with navigation options on one screen and content on another.
- Extending the display area for projects that require more than 16x2 characters.
Hardware/Components
- Arduino Uno (or other compatible board)
- Two or more LCD1602 displays with I2C backpacks
- Jumper wires
- Potentiometer (for contrast adjustment on the LCDs - usually included with I2C backpack)
Wiring Guide
(in video at 01:16)
- Connect the VCC pin of each I2C LCD to the Arduino's 5V pin.
- Connect the GND pin of each I2C LCD to the Arduino's GND pin.
- Connect the SDA pin of each I2C LCD to the Arduino's SDA pin (A4 on Uno).
- Connect the SCL pin of each I2C LCD to the Arduino's SCL pin (A5 on Uno).
For other Arduino boards, consult the pinout diagram for SDA and SCL pins (in video at 02:20).
Addressing: Each LCD needs a unique I2C address. This is typically set using solder pads on the I2C backpack (in video at 02:41). Use the provided I2C scanner code (in video at 06:16) to determine the address of each LCD.
Code Explanation
The code is designed to make it easy to display various data types (integers, floats, strings) on multiple LCDs. The core functionality revolves around custom functions:
LiquidCrystal_I2C lcd1(0x3F, 16, 2); // Display 1 (in video at 05:24)
LiquidCrystal_I2C lcd2(0x26, 16, 2); // Display 2
// ... add more LCD objects as needed
Replace 0x3F
and 0x26
with the I2C addresses of your LCDs.
lcdDisplay(1, 0, "Age: ", intToStr(age), " years"); // (in video at 09:23)
This function simplifies displaying data on a specific LCD (first argument), row (second argument), with a title (third argument), value (fourth argument), and units (fifth argument). The intToStr()
and floatToStr()
functions convert numerical data to strings for display.
Live Project/Demonstration
(in video at 09:07) The demonstration shows how to display age, days, weight, and voltage on two different LCDs. The values are updated dynamically in the loop.
Chapters
- [00:00] Introduction and Project Overview
- [01:16] Wiring Explanation
- [02:20] Arduino Board Pinouts
- [02:41] I2C Addressing
- [04:40] Code Overview
- [06:16] I2C Scanner
- [07:21] Decimal Places and Number Formatting
- [08:00] Setup Function
- [08:58] Loop Function and Data Display
- [12:01] Custom Display Function
- [13:10] String Conversion Functions
Images

How to use two or more LCD1602-I2C modules with Arduino

How to use two or more LCD1602-I2C modules with Arduino
Comments will be displayed here.