#include <LiquidCrystal_I2C.h>
// Set the I2C (Inter-Integrated Circuit) address of the device communicating with 0x27
#define I2C_ADDR 0x27
// Define the number of columns on your LCD display (set to 16)
#define LCD_COLUMNS 16
// Define the number of lines on your LCD display (set to 2)
#define LCD_LINES 2
// Create an instance of the LiquidCrystal_I2C to control an LCD display
LiquidCrystal_I2C lcd(I2C_ADDR, LCD_COLUMNS, LCD_LINES);
void setup()
{
// Initializes the LCD
lcd.init();
// Turns on the LCD backlight
lcd.backlight();
}
void loop() {
// Set the cursor position on the LCD screen
// Cursor is placed at the 4th column (starting from 0) and the 0th row (the first row)
lcd.setCursor(4, 0);
lcd.print("Hello");
// Cursor position to the 2nd column and the 1st row (the second row)
lcd.setCursor(2, 1);
lcd.print("Sangavi!");
}