#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 20, 4);
// Fungsi animasi ketik per huruf
void animateText(const char* text, int row, int delayTime = 100) {
lcd.setCursor(0, row);
for (int i = 0; text[i] != '\0'; i++) {
lcd.print(text[i]);
delay(delayTime);
}
}
void setup() {
lcd.init();
lcd.backlight();
}
void loop() {
lcd.clear();
animateText("Don't listen to them", 0, 70);
delay(1500);
lcd.clear();
animateText("Cause what do they", 0, 50);
lcd.setCursor(0, 1);
animateText("know", 1, 50);
delay(2000);
lcd.clear();
animateText("We need each other", 0, 70);
lcd.setCursor(0, 1);
animateText("to have, to hold", 1, 70);
delay(2000);
lcd.clear();
animateText("They'll see in time", 0, 80);
lcd.setCursor(0, 1);
animateText("I know", 1, 70);
delay(2500);
lcd.clear();
animateText("When destiny calls", 0, 70);
lcd.setCursor(0, 1);
animateText("you must be strong", 1, 70);
delay(2500);
lcd.clear();
animateText("I may not be with you", 0, 70);
lcd.setCursor(0, 1);
animateText("But you've got", 1, 70);
delay(2000);
lcd.clear();
animateText("to hold on", 0, 70);
lcd.setCursor(0, 1);
animateText("They'll see in time", 1, 80);
delay(2000);
lcd.clear();
animateText("I know", 0, 70);
delay(4000);
// Ulangi lagi otomatis
}