Loading...

Friday, March 05, 2021

Interface LCD Display & I2C Module With Arduino Uno

Hello friends welcome back to “Diyprojectslab,”In previous video we see how to interface LCD 16Ă—2 to Arduino Uno, but there are very complicated circuits, so in this tutorial, I’ll show you how to reduce circuitry by using I2C module which is very compact & easy to connection. Simply connect I2C module with LCD parallel & connect I2C modules 4 pins to Arduino. I2C module has 4 output pins which contains VCC, GND,SDA, SCL where 5V supply gives to I2C module through VCC & GND to GND of Arduino. SDA is a data pin & SCL is clock pin of I2C module. To interface LCD and I2C with Arduino we need Liquid Crystal I2C Library in Arduino IDE software. In my upcoming projects we need LCD in project & to avoid complicated circuit I’ll use I2C module. So let’s get started  . . . . .

MATERIAL REQUIRED

To make this project we need some components :-
  1. Arduino Uno x 1
  2. LCD (16×2) x 1 & I2C Module x 1
  3. Connecting Wires x 1 nos
  4. Soldering Gun x 1
  5. Breadboard x 1

CIRCUIT DIAGRAM

Follow Circuit Diagram to make connection.
Connect I2C Module with LCD display parallel. As shown in circuit.
Arduino To I2C Module Connection :-
5V – VCC
GND – GND
A4 – SDA
A5 – SCL

INSTALL ARDUINO LIQUIDCRYSTAL I2C LIBRARY IN ARDUINO IDE

To make this project we need Arduino Liquidcrystal library in arduino IDE. Follow following steps to add this library in Arduino IDE software.
  1. Open Arduino IDE Software.
  2. Select Sketch > Include Library > Add. Zip library.
  3. New dialog box will open.
  4. Select Zip file. (Download Zip File)
  5. Click on Open Button.
Now Arduino Liquid Crystal Library is successfully Installed in your Arduino IDE.

ARDUINO CODE

Simply Copy the following code & upload in your Arduino IDE software.
// Welcome to Techno-E-Solution 
// Here is code for Interface LCD I2C module with Arduino

#include <Wire.h>
 
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,16,2);  // set the LCD address to 0x27 for a 16 chars and 2 line display

void setup()
{
 
  lcd.backlight();
  
  lcd.setCursor(0,0);
  
  lcd.print("Hello world!");

  lcd.setCursor(0,1);
    
  lcd.print("TechnoEsolution");

}


void loop()
{
}

DEMONSTRATION

Leave a Reply

Your email address will not be published. Required fields are marked *