Go Down

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

RobDrizzle

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?

Thanks!

RobDrizzle

I just thought of something.

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

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


Would this work or look delayed and slow?

liudr

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.

floresta


Go Up