//include the library code
#include <LiquidCrystal.h>
LiquidCrystal lcd(21, 19, 18, 5,4,2);
void setup()[
//set up thelcd number of columns and rows;
lcd.begin(16,2);
}
void loop(){
//set the cursor to (0,0);
lcd.setCursor(0,0);
//print from 0to 9;
for(int thischar = 0; thisChar < 10; thisChar++){
lcd.print(thisChar);
delay(1000);
}
//set the cursor to (16,1);
lcd.setCursor(16,1);
//set the display to automatically scroll;
lcd.autoscroll();
//print from0 to9;
for(int thisChar = 0; thisChar < 10; thisChar++);
lcd.print(thisChar);
delay(1000);
delay(500);
]
lcd.noAutoscroll();
lcd.clear();
}
}
}
]