#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Set the address of your I2C LCD module
int lcdAddress = 0x27;
bool turn = true;
long timer = 0;
byte hart[] = {
B00000,
B01010,
B11111,
B11111,
B11111,
B01110,
B00100,
B00000
};
// Create an instance of the LiquidCrystal_I2C library
LiquidCrystal_I2C lcd(lcdAddress, 16, 2); // Set the LCD address and size
void setup() {
// Initialize the LCD
lcd.init();
lcd.backlight();
lcd.createChar(0, hart);
lcd.setCursor(1, 0);
lcd.write(byte(0));
lcd.setCursor(2, 0);
lcd.print("WELCOME ");
lcd.setCursor(9, 0);
lcd.write(byte(0));
lcd.setCursor(0, 1);
lcd.print(" Proj. LAB");
}
void loop() {
if (turn) lcd.scrollDisplayRight();
else lcd.scrollDisplayLeft();
if (timer > 3) {
turn = !turn;
timer = 0;
}
delay(200);
timer += 1;
}