#include <LiquidCrystal_I2C.h>
// Initialize the LCD with the I2C address (usually 0x27 or 0x3F)
// 16, 2 represents a 16x2 LCD module
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
// Initialize the LCD
lcd.init();
lcd.clear();
lcd.backlight(); // Make sure backlight is on
// Turn on the backlight
lcd.backlight();
// Display a welcome message
lcd.setCursor(0, 0); // Set cursor to the first column of the first row
lcd.print("Hello, World!");
lcd.setCursor(0, 1); // Set cursor to the first column of the second row
lcd.print("I2C LCD Test");
}
void loop() {
// No need for additional code in this simple example
}