Professional Documents
Culture Documents
New Text Document
New Text Document
h>
LiquidCrystal lcd(2,3,4,5,6,7);
int iLineNumber = 1;
// Line number to show your string (Either 0 or 1)
int iCursor = 0;
void setup()
{
lcd.begin(16, 2);
}
void loop()
{
UpdateLCDDisplay();
// Scoll text by 1 character
delay(300);
// Change delay to change speed for scrollig text.
}
void UpdateLCDDisplay()
{
int iLenOfLargeText = strlen(LargeText);
// Calculate lenght of string.
if (iCursor == (iLenOfLargeText - 1) )
// Reset variable for rollover effect.
{
iCursor = 0;
}
//lcd.clear();
lcd.setCursor(0,iLineNumber);