adafruit gfx

I have 4 different screens with 4 different real values.
Pressure from an pressure transducer temperature hight over sealevel via bmp180 and voltage over a voltage divider.

now when some value is changed, i delete the whole value with fillrect (have to do it with this because i am using and alternate font from adafruit gfx instead of the standard one) then wrote the new value but this flickers. so i want that only the character of the value that is changed should be deleted and rewroted.

if the old value is 1.2 and the new value is 1.5 only delet the “2” and wrote the “5”

I found solutions that did’t work:

1st Problem)Try adding some delay in the loop() like 100 ms or greater until flickering goes away.
// variable to store ms when screen gets updated

unsigned long lastUpdateTime = millis();

2nd Problem)Just clear the screen before writing the new value and it would be the same result.
// Update the screen after every 100 ms

// Try increasing/decreasing the time for better result, too less time causes flickering

if ((oldDispMode != dispMode) && (millis() - lastUpdateTime > 100))

It doesn’t work! :o
Can someone help?

fixed_v3.ino (19.7 KB)

It doesn't work!

That is the lamest possible thing you can say here.

The code you posted, without providing links to the non-standard libraries you are using, does something. Aside from some hand-waving about flickering, you have not said what the code actually does. You have not said what you expect it to do. All that we know is that whatever it does is not what you want.

Can someone help?

Do you really think so?