#include <Arduino.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#define I2C_SDA 21
#define I2C_SCL 22
// Set the LCD address to 0x27 (this may vary depending on your LCD module)
LiquidCrystal_I2C lcd(0x27, 20, 4); // 20 columns, 4 rows
void setup()
{
Serial.begin(115200);
// Initialize I2C with custom SDA and SCL pins
Wire.begin(I2C_SDA, I2C_SCL);
Serial.println("LCD SETUP");
// Initialize the LCD
lcd.init();
// Turn on the backlight
lcd.backlight();
// Print a message to the LCD
lcd.setCursor(3, 0);
lcd.print("Hello, World!");
lcd.setCursor(2, 1);
lcd.print("ESP32 + LCD 20x4");
lcd.setCursor(0, 2);
lcd.print("Row 3 Testing...");
lcd.setCursor(0, 3);
lcd.print("Row 4 OK!");
}
void loop()
{
// You can update the LCD display here if needed
}