Failure to display number "1" on ST7789V display

For general Flowcode discussion that does not belong in the other sections.
Post Reply
OderlandoRSilva
Posts: 24
http://meble-kuchenne.info.pl
Joined: Mon Oct 30, 2023 1:17 pm
Has thanked: 2 times
Been thanked: 5 times

Failure to display number "1" on ST7789V display

Post by OderlandoRSilva »

I'm using an ESP32-WROOM-32 module and a 1.47" ST7789V TFT display to read an AHT10 sensor and I noticed that when showing the number "1" on the display, some pixels of the previous number remain lit nearby. This only happens with the number "1". I could clear the numbers before showing the next readings on the screen, but there is a delay that causes the numbers to blink and does not contribute to the aesthetics of the product. I created another code to clear the pixels that remain lit after the number 1 appears, but I believe that modifying the source code would be more efficient.
Attachments
TFT-Display-1.47in.fcfx
(39.3 KiB) Downloaded 11 times
TFT_Display.jpeg
TFT_Display.jpeg (28.17 KiB) Viewed 158 times

medelec35
Matrix Staff
Posts: 1954
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 626 times
Been thanked: 656 times

Re: Failure to display number "1" on ST7789V display

Post by medelec35 »

Hello its not a bug, its doing want you asked i.e writing a number 1 over a different number which is wider .
Since the number 1 is narrowest number then part of the other numbers will be shown.
It's not like an LCD where the width its the same no matter what char it is
The solution is to use string instead.
For example using string:

Code: Select all

Count = Count + 1
Str = ToString$(Count)
Str = Str + " % "
The space after the % is vital, so it must be left in.
The other alternative that is looking promising is using the GLCD Texfield, but you must make use its UpToDate first by running a full database library update, then reloading your project.

Let me know if you require further help.
I have moved this topic to the general section.
Martin

Post Reply