#include <LiquidCrystal.h>

// LCD module connections
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
  // Initialize the LCD
  lcd.begin(16, 2);
  lcd.print("Department of");
  lcd.setCursor(0, 1);
  lcd.print("ECS");
}

void loop() {
  // Shift the entire display to the left
  for (int i = 0; i < 16; i++) {
    lcd.scrollDisplayLeft();
    delay(300); // Delay between shifts
  }
  // Delay before scrolling back
  delay(1000);
  // Scroll back to the original position
  for (int i = 0; i < 16; i++) {
    lcd.scrollDisplayRight();
    delay(300); // Delay between shifts
  }
  // Delay before next iteration
  delay(1000);
}