Iv'e been using the Hitachi 20x4 screen for a while now and I'm constantly noticing that the integer variables I am printing are not as they should be. Last night I setup a few lines: temp, humidity, light, IR motion. The one that keeps playing up the most is the Light sensor and IR motion, it keeps adding digits, especially zeros, and does not always look the same as the serial monitor version. I've tried added "DEC" within the print brackets to stop any values from 0 to 9 being single to stop each line from reshuffling, but that didn't do anything to help.
Can you add a "clear display" line of code and add a delay that is long enough for you to see what is happening? I've had similar problem that something gets written to the display; is PARTIALLY over written; yet some confusing remnants remain.
It writes so fast it's difficult to see in real time.
Thanks guys, that makes sense, I know I do something similar on the lcd.setCursor(0,0) to erase each line when sending SD card debugging strings. Never thought of making a function for it
Will give that method a try next time I fire up the sketch