1st Clear the display by writing some spaces to erase the previous characters
2nd Insert a delay into the loop because you write much faster than the human eye may follow
Consider posting your project so all settings can be looked at -
Thanks , sending spaces to clear the LCD fixed the display problem , I also added a delay loop. Is it true there is no CLEAR command to clear and home the LCD?
You clear the display by writing spaces to it.
Easiest way is to create an array, say if display is X 16, that is 17 in length and
init it with spaces -
unsigned char LCDclear[ 17 ] = " ";
and just print the string to each row.