Pages: [1]   Go Down
Author Topic: Phantom numbers remaining on LCD?  (Read 514 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Sr. Member
****
Karma: 1
Posts: 252
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 252
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 74
Posts: 7260
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


Western New York, USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 4395
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

We dealt with a similar problem about a week ago.  (http://arduino.cc/forum/index.php/topic,54023.0.html)

Don
Logged

Pages: [1]   Go Up
Jump to: