#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
String textToScroll_1 = " Hidupmu Berat?";
String textToScroll_2 = " Pakai AI aja";
int scrollDelay = 400;
void setup (){
lcd.init();
lcd.backlight();
lcd.setCursor(0, 0);
}
void loop() {
for (int i = 0; i <= textToScroll_1.length(); i++) {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(textToScroll_1.substring(i));
delay(scrollDelay);
}
for (int i = 0; i <= textToScroll_2.length(); i++) {
lcd.clear();
lcd.setCursor(0, 1);
lcd.print(textToScroll_2.substring(0, i));
delay(scrollDelay);
}
}