LCD clear one character?

I was wondering if it is possible to clear a single character on an LCD screen as I’m constantly updating the screen when i display a 2 digit number then show a single digit number the 2nd digit from the 2 digit number remains. I need to keep the rest of the information on the screen though.

Thanks in advance

lcd.setCursor(X,Y);
lcd.print(" ");

That's how I do it!

Awsomdk:

lcd.setCursor(X,Y);

lcd.print(" ");




**That's how I do it!**

That's how we do it :wink:
@ bobbcab.. If you want to clear and write something there then directly after setting cursor print that character instead of space.

Hahaha i didn't think of that, thanks guys

This is not working for me :frowning:

BTW: I use a Adafruit i2c 16x2 RGB

This is not working for me

What isn't? Where is the code? What exactly happens?

lcd.print(myNumber);
if(myNumber < 10)
  { lcd.print(" "); }
else if(sbTime>=100){
 lcd.setCursor(5,0);
    lcd.print(""); 
 lcd.setCursor(z,0);
 lcd.print(sbTime);
 lcd.setCursor(0,0);
 lcd.print(mbTime);
 lcd.setCursor(x,0);
 lcd.print(":");
 lcd.setCursor(5,0);
    lcd.print(""); 
 delay(time);
 sbTime--;
 pwState = wState;
 }

I put it to clear a certain part of the lcd where the millisecond counter is. It never cleared. When i replaced the lcd.print(""); with lcd.print("."); it displayed an period where I wanted the nothing. Help?!

wwb00:

else if(sbTime>=100){

lcd.setCursor(5,0);
    lcd.print("");
lcd.setCursor(z,0);
lcd.print(sbTime);
lcd.setCursor(0,0);
lcd.print(mbTime);
lcd.setCursor(x,0);
lcd.print(":");
lcd.setCursor(5,0);
    lcd.print("");
delay(time);
sbTime--;
pwState = wState;
}



I put it to clear a certain part of the lcd where the millisecond counter is. It never cleared. When i replaced the lcd.print(""); with lcd.print("."); it displayed an period where I wanted the nothing.

Nothing, by definition, occupies no space. Space, by definition, does.

In other words, try using

 lcd.print(" ");

(NOTICE THE SPACE BETWEEN THE QUOTES)

instead of

lcd.print("");

thanks!!