How to remove previous reading value in loop on tft screen

Hello,
I use touch screen TFT LCD and arduino. I would like to display changing temperature value on the screen without previous value one (on the same place). Could give me some cue how to remove previous value from screen on the end of the loop?
Thanks a lot

One way is to print the old value again but with the colour set to the same as the background colour, then print the new value.

Note that there is no point printing the changes more than about 5 times per second because your eyes cannot see anything faster than that. You should consider only printing a value when it has changed.

Thank you for your advice I will do this way. It does seem a little strange to me that there is not a special function for this kind of operation but I made a research and i have not found.

On the Arduino IDE install the " TFT_eSPI " library (GitHub - Bodmer/TFT_eSPI: Arduino and PlatformIO IDE compatible TFT library optimised for the Raspberry Pi Pico (RP2040), STM32, ESP8266 and ESP32 that supports different driver chips). The padding example shows how to overwrite the TFT. I have used it with an "AS7341" light meter and it works brill. Good luck :slight_smile:

There is no need for a special function, because it is so simple to accomplish with the existing functions.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.