#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2); // Set the I2C address and LCD dimensions
void setup() {
lcd.begin(16, 2); // Initialize the LCD
lcd.backlight(); // Turn on the backlight
lcd.setCursor(0, 0); // Set the cursor to the beginning
lcd.print("Get Ready....");
delay(3000);
}
void loop() {
scrollText(); // Call the function to scroll text
delay(500); // Adjust the delay based on scrolling speed
}
void scrollText() {
static String text = "oM zrii gurave namaH | I made a scrolling text display today.";
static int length = text.length();
for (int i = 0; i < length; ++i) {
lcd.clear(); // Clear the LCD
lcd.setCursor(0, 0); // Set the cursor to the beginning
lcd.print(text.substring(i, i + 16)); // Display 16 characters at a time
delay(350); // Adjust the delay for scrolling speed
}
}