#include <LCD-I2C.h>
LCD_I2C lcd(0x27, 16, 2);
//ps. i took all of this code from the library's github site
void setup() {
// put your setup code here, to run once:
lcd.begin();
lcd.display();
lcd.backlight();
}
void loop() {
// put your main code here, to run repeatedly:
// Scroll left and right
lcd.setCursor(10, 0);
lcd.print(F("To the left!"));
for (int i = 0; i < 10; i++)
{
lcd.scrollDisplayLeft();
delay(200);
}
lcd.clear();
lcd.print(F("To the right!"));
for (int i = 0; i < 10; i++)
{
lcd.scrollDisplayRight();
delay(200);
}
lcd.clear();
}