1#include <LiquidCrystal.h>
2
3// Initialize the library with your specific pins
4LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
5
6void setup() {
7 // Set up the LCD's number of columns and rows
8 lcd.begin(16, 2);
9}
10
11// Custom helper function to easily print to two lines and wait
12void showLyrics(String line1, String line2, int waitTime) {
13 lcd.clear(); // Only clears right before printing new text
14
15 lcd.setCursor(0, 0); // Top line
16 lcd.print(line1);
17
18 lcd.setCursor(0, 1); // Bottom line
19 lcd.print(line2);
20
21 delay(waitTime); // How long this specific chunk stays on screen
22}
23
24void loop() {
25 // --- Lyric 1 ---
26 showLyrics("The morning", "light is turning", 2500);
27 showLyrics("blue The feeling", "is bizzare", 2500);
28
29 // Notice there is no lcd.clear() here anymore!
30 delay(5000); // The text stays on screen during this 5 second gap
31
32
33 // --- Lyric 2 ---
34 showLyrics("The night is", "almost over I", 2500);
35 showLyrics("still don't know", "where you are", 2500);
36
37 delay(5000);
38
39
40 // --- Lyric 3 ---
41 showLyrics("The shadows,", "yeah, they keep", 1800);
42 showLyrics("me pretty like a", "movie star", 1800);
43 showLyrics("(HA-HA-HA-HA)", "", 1800);
44
45 delay(5000);
46
47
48 // --- Lyric 4 ---
49 showLyrics("Daylight makes", "me feel", 2500);
50 showLyrics("Like Dracula", "", 2500);
51
52 delay(5000);
53}