#include <LiquidCrystal.h>
// LCD pins: RS, E, D4, D5, D6, D7
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
String lyrics[] = {
"It's you",
"It's always you",
"met a lot of people but nobody feels like you",
"so please don't break",
"my heart",
"don't tear me apart",
"I know how it start",
"Trust me I've been broken before",
"I know I'm not",
"the best",
"at choosing",
"lovers",
"we both know",
"my past",
"speaks for itself",
"if you don't think",
"that we're right",
"for each other",
"then please",
"don't let history",
"repeat itself",
"'cause I want you",
"I want you",
};
int totalLines = 23; // number of lines
int delayTime = 1500; // 2 seconds per line
void setup() {
lcd.begin(16, 2); // 16x2 LCD
}
void loop() {
for(int i = 0; i < totalLines; i++) {
lcd.clear();
// Split lines if too long
if(lyrics[i].length() <= 16) {
lcd.setCursor(0, 0);
lcd.print(lyrics[i]);
} else {
// Scroll long line
for(int j = 0; j < lyrics[i].length() - 15; j++) {
lcd.setCursor(0, 0);
lcd.print(lyrics[i].substring(j, j+16));
delay(150);
}
}
delay(delayTime);
}
}