16*2 i2C LCD with Arduino :

The LCD has 2 rows and 16 columns. That’s why it is called 16*2 LCD. We can use the LCD with i2C driver. That can make the LCD easy to use. We can use the LCD by using SDA and SCL pin of Arduino.

16*2 LCD with i2c Driver

Components :

  • Arduino Uno
  • Jumper Wires
  • 16*2 i2C LCD

Pinout :

  • GND –> GND
  • VCC –> VCC
  • SDA –> A4
  • SCL –> A5

Circuit Diagram :

Library :

Step 1 –> Download the library

Here you can download the library:

https://www.arduino.cc/reference/en/libraries/liquidcrystal-i2c/

Step 2 –> Go to sketch –> Go to Include library –> Click on Add .ZIP library…

Code :

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

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

void setup()
{
	// initialize the LCD
	lcd.begin();

	// Turn on the backlight and print a message.
	lcd.backlight();
  lcd.setCursor(0,0); // before comma set column number and after comma set row number   
	lcd.print("ArduinoTutors.com");
  lcd.setCursor(6,0); // before comma set column number and after comma set row number   
  lcd.print("Hello, viewer!");
}

void loop()
{
	// Do nothing here...
}

1 Comment

Leave a Reply

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

Facebook
YouTube
× Contact us