Go Down

Topic: Phantom numbers remaining on LCD? (Read 758 times) previous topic - next topic


I have a program that monitors water pressure and displays it on a sparkfun 16x2 serLCD. The pressure value is updated every 500 milliseconds. All is well if the display shows 0-99, but when the pressure reaches 100 and decreases back to 99, the "ones" digit does not clear so the display reads "990" for 99. It will do this when any value takes up more spaces then the next value.

For example:
It will print "this is a test"
Then "good"

The display will read "good is a test"

I can use the clrLCD command but then I have to reprint all of the other information on the screen

Any ideas?



I just thought of something.

What if I printed 4 spaces just before the printing of the pressure?

  Serial.print("PSI= ");
  goTo(24); //6th space on 2nd line
  Serial.print("    ");

Would this work or look delayed and slow?


I do spaces too. Won't slow you down, unless you print too often.

Say each time you read value, increment a constant i by i++;
Then when i reaches say 200, do an lcd.print(). This way you save lots of time.
Serial LCD keypad panel,phi_prompt user interface library,SDI-12 USB Adapter


Go Up