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)