#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
lcd.init(); // Inisialisasi LCD
lcd.backlight(); // Nyalakan backlight LCD
lcd.setCursor(0, 0); // Posisi kursor di baris 1, kolom 1
lcd.print("Hello, World!");
delay(1000);
}
void loop() {
// put your main code here, to run repeatedly:
lcd.setCursor(0, 0);
lcd.print("Contoh I2C: ");
delay(1000); // this speeds up the simulation
lcd.setCursor(0, 1);
lcd.print("1. LCD 16x2 I2C");
delay(1000);
}