Clear Screen and 2.8TFT

Hello everybody .
I have this problem: when the number of temperature is update from sensor, this number is overwrite and i can't see the correct temperature..
Can you help me?
can update only the temperature without change the screen???

Thanks
F.N.

dopo.jpg

You are best starting your own thread on this, but you need to blank out the old number before printing the new one.

Tft.TFTinit();

worked for me,

it re-inits the library and clears the screen

tried everything here none of it worked for me,
I need "Button Pressed" to be deleted before "Button Released" appears on screen, and vice verse
and ideas to try?

if (buttonState != oldButtonState){
if (millis () - buttonPressTime >= debounceTime){ // debounce
buttonPressTime = millis (); // when we closed the switch
oldButtonState = buttonState; // remember for next time
if (buttonState == LOW){
Serial.println ("Button Pressed"); // DEBUGGING: print that button has been closed
buttonPressed = 1;

// set the font color to white
TFTscreen.stroke(255, 255, 255);
// set the font size
TFTscreen.setTextSize(1);
// write the text to the top left corner of the screen
TFTscreen.text("Button Pressed", 0, 40);

}
else {
Serial.println ("Button Released"); // DEBUGGING: print that button has been opened
buttonPressed = 0;

// set the font color to white
TFTscreen.stroke(255, 255, 255);
// set the font size
TFTscreen.setTextSize(1);
// write the text to the top left corner of the screen
TFTscreen.text("Button Released", 0, 40);

I need "Button Pressed" to be deleted before "Button Released" appears on screen, and vice verse

Does "on screen" refer to the TFT screen or the Serial Monitor screen?

Something happens with the code you posted. Only YOU can see what that is.

Use tft.fillScreen(Color); change color to your color of your background you want. You have to use #define Color #FFFF at the start of the code. #FFFF is the color for white, change that to a different color. Use this: 16 bit color generator (RGB565 color picker) | Electrical engineering and programming notepad and copy the 16 bit color code and replace "#FFFF" with your color value.