#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Set the LCD address to 0x27 or the address of your module
LiquidCrystal_I2C lcd(0x27, 20, 4); // 0x27 is the default I2C address for a 20x4 display
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32-S2!");
// Initialize the LCD
lcd.begin(16, 2); // Change these values to match your LCD (columns, rows)
lcd.clear();
lcd.print("Hello, LCD!");
delay(2000); // Delay to see the initial message on the LCD
}
void loop() {
// put your main code here, to run repeatedly:
lcd.setCursor(0, 1); // Set the cursor to the second line
lcd.print("Time: " + String(millis() / 1000) + "s");
delay(1000); // Update every second
}