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.
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...
}
Good day! I just want to offer you a big thumbs up for your excellent information you have got here on this post. Ill be coming back to your blog for more soon.