I am not able to overwrite existing text with other text. I get sooner or later complete filled squares.I have to blank it manualy to get it working. This is pumping up my Code, it is a Display with a lot of changing text. Thank you.
Please be more accurate with your thread title. (the Author can always edit it)
Post a link to the actual display.
Post a link to the ESP32 board.
There are several ways to solve the background problem. e.g. print the old text pixels in background colour or just use fillRect() to paint the whole rectangle.
fillRect() is generally quicker and requires less brain-ache.
print() might be quicker for very fine fonts because there is more background pixels than letter pixels.
You should not get reboots on an ESP32 unless you are doing something very wrong.
The ESP8266 requires regular kicking i.e. with yield()
Bodmer's TFT_eSPI library supports parallel ILI9486.
Bodmer has much better text handling.
Bodmer's library is faster than MCUFRIEND_kbv on ESP32 but does not support as many controllers.
void showmsgXY(int x, int y, const GFXfont *f, int sz, String msg, unsigned long FG, unsigned long BG){
tft.setFont(f);
tft.setCursor(x, y);
tft.setTextColor(FG);
tft.fillRect(x, y, (sz/1.6)*msg.length()+2, 4-sz, BG);
tft.print(msg);
}
Thank you, please keep up the excellent work. PS: The reboots where caused by declaring an array at wrong place...