My serial LCD display, automatically writes to the next line, when the end of the first line is reached, and it also automatically scrolls the lines up 1, once the end of the 2nd line is reached. (MatrixOrbital LK162), so it's very easy to send a sentence to the display with a time based function like this code below.
sendMessage("This sentence is an example of one of a several text strings I have in my program that I want to scroll on my LCD display");
void sendMessage(char myMessage[]) {
i = 0; //reset display character counter
LCDclear();
while(1) { //loop
if(millis() - prevLCDtime > 100 ) { //continue every 10 ms
prevLCDtime = millis(); //update the time counter
Serial.print(myMessage[i]); //print the next letter to the display
i = i + 1; //increase counter
if (i == strlen(myMessage)) break; //when the counter i gets to the end of the message, break
}
}
delay(1000); //time to read the last line
}
But I'm wanting to move a lot of these sentences to flash memory, via:
http://arduiniana.org/libraries/flash/
I understand what they're saying there pretty well, but not sure how to use it in conjuntion with my code, as I need to print the characters of my message one by one on a time based interval, to give the user time to read the display.
Any ideas? My concept of printing to the display works well like it is, but maybe there's a better way to do it??