Project 1 - Interfacing a 16*2 LCD with Arduino using I2C protocol
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2); // Change 0x27 to your LCD's I2C address if needed
void setup() {
lcd.init(); // Initialize the LCD
lcd.backlight(); // Turn on backlight
lcd.setCursor(0, 0);
lcd.print("Hello, Arduino!");
lcd.setCursor(0, 1);
lcd.print("I2C LCD Display");
}
void loop() {
// Nothing to do here
}