LCD I2C Display

Z2M Part: EMA-00001-A

Display text on 16x2 LCD with I2C interface.

Circuit Diagram
Circuit diagram for LCD I2C Display
Wire Connections & Pin Configuration

Wire Color Connections:

Green → A4 (SDA) to LCD SDA
Blue → A5 (SCL) to LCD SCL
Red → 5V to LCD VCC
Black → GND to LCD GND

Pin Configuration:

Arduino SDA (A4) → LCD I2C SDA pin
Arduino SCL (A5) → LCD I2C SCL pin
Arduino 5V → LCD VCC
Arduino GND → LCD GND
Arduino Code
Edit
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

// Set the LCD address to 0x27 for a 16x2 display
LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup() {
  lcd.begin();      // Initialize the LCD
  lcd.backlight();  // Turn on the backlight
}

void loop() {
  // Set cursor to column 3, row 1 (second line)
  lcd.setCursor(3, 1);
  lcd.print(\"Zero2Maker!\");

  // Set cursor to column 4, row 0 (first line)
  lcd.setCursor(4, 0);
  lcd.print(\"I feel happy!\");

  delay(1000);  // Display for 1 second

  // Clear the LCD display
  lcd.clear();
  delay(500);
}

Instruction Details

Wiring: Connect LCD I2C SDA to Arduino A4, SCL to A5. Connect VCC to 5V and GND to GND.
Library: Sketch → Include Library → Manage Libraries → search "LiquidCrystal I2C" → Install.
Upload Code: Tools → Board → Arduino Uno. Tools → Port → select your COM port. Click Upload button.
View Output: Text displays on LCD screen. Use I2C scanner to find address (usually 0x27 or 0x3F) if display is blank.

How to Use

  1. Connect the required components as per the Pin Configuration above
  2. Open Arduino IDE and create a new sketch
  3. Copy and paste the code above
  4. Select your Arduino board and COM port from Tools menu
  5. Click the Upload button to upload the code to your Arduino
  6. Open Serial Monitor (if applicable) to see the output

Components Required

  • Arduino Uno
  • 16×2 or 20×4 LCD I2C Display
  • Breadboard
  • Jumper Wires

Category: LEDs & Display