#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
void setup()
{
lcd.begin(16, 2);
lcd.print("Arduino Sketch");
delay(1000);
}
void loop()
{
for (int positionCounter = 0; positionCounter < 13; positionCounter++)
{
lcd.scrollDisplayLeft();
delay(150);
}
for (int positionCounter = 0; positionCounter < 29; positionCounter++)
{
lcd.scrollDisplayRight();
delay(150);
}
// Scroll 16 positions (display length + string length) to the left to move it back to center
for (int positionCounter = 0; positionCounter < 16; positionCounter++)
{
lcd.scrollDisplayLeft();
delay(150);
}
delay(1000);
}