#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Set the LCD address to 0x27 or the address assigned to your specific display
#define LCD_I2C_ADDR 0x27
#define BACKLIGHT_PIN 3
// Set the PCF8574T IO expander address (modify as needed)
#define EXPANDER_I2C_ADDR 0x20
// Define LCD dimensions (number of columns and rows)
#define LCD_COLUMNS 16
#define LCD_ROWS 2
// Create an instance of the LCD object
LiquidCrystal_I2C lcd(LCD_I2C_ADDR, LCD_COLUMNS, LCD_ROWS);
void setup() {
// Initialize the LCD
lcd.init();
// Turn on the backlight
lcd.backlight();
// Print a message to the LCD
lcd.setCursor(0, 0);
lcd.print("Hello, World!");
lcd.setCursor(0, 1);
lcd.print("I2C LCD Test");
// Initialize the Wire library
Wire.begin();
// Add code to initialize any additional I2C devices if needed
}
void loop() {
// No continuous action required in this basic example
}