#include <LiquidCrystal.h>
// Define LCD Pins
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
String msg = "Congratulations, Content Developers +-*/";
void setup() {
// put your setup code here, to run once:
lcd.begin(16, 2);
}
void loop() {
// put your main code here, to run repeatedly:
lcd.clear();
lcd.println(msg);
// delay(1000);
// lcd.clear();
// lcd.setCursor(0,1);
// lcd.println(msg);
// delay(1000);
// lcd.scrollDisplayLeft();
// delay(1000);
// for (int i=0; i<msg.length()-16; i++)
// {
// lcd.scrollDisplayLeft();
// delay(1000);
// }
// int i = 0;
// while (i < msg.length() - 16) {
// lcd.scrollDisplayLeft();
// delay(1000);
// i++;
// }
#if 0
int i = msg.length() - 16;
while (i > 0) {
lcd.scrollDisplayLeft();
delay(1000);
i--;
}
#endif
scroll();
}
void scroll() {
#if 1
int i = msg.length() - 16;
do {
lcd.scrollDisplayLeft();
delay(1000);
i--;
} while (i > 0);
#endif
}