#include <LiquidCrystal.h>
const int rs=12;
const int e=11;
const int d4=10;
const int d5=9;
const int d6=8;
const int d7=7;
LiquidCrystal lcd(rs,e,d4,d5,d6,d7);
String msg1 =" enter the first number";
char msg2 ="second number";
unsigned long previous_time=0;
int val1,val2;
void setup() {
// put your setup code here, to run once:
lcd.begin(16,2);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
if(millis()-previous_time>=2000UL){
lcd.setCursor(0,0);
//lcd.scrollDisplayLeft();
//delay(200);
lcd.print(msg1.substring(0,16));
lcd.setCursor(0,1);
lcd.print(msg1.substring(16,32));}else{
lcd.clear();
previous_time=millis();}
Serial.print("enter the first number");
val1=Serial.parseInt();
while(Serial.available()==0){}
lcd.print(val1);
//delay(500);
lcd.clear();
}