LCD and refreshing a countdown timer - best practices?
i'm using seeedstudio 2.8" lcd display display data few sensors. i've got timer counts down 0 in "00:00:00" format. i'm pretty happy counter logic (about 30 seconds fast after hour no rtc; tweaked small delay), there's got alternative how i've got displaying/updating now.
i'm converting seconds, minutes , hours string using dtostrf() , concatenating them ":" separator 1 composite string written lcd each pass through main loop. however, timer sort of "flashes" when it's written screen in white , rewritten in black after (in order clear pixels out next update of timer).
i wondering if best way circumvent break "00:00:00" composite string 3 separate components (one hour, 1 minute, , 1 second) , update components when necessary. way, second component flashing continuously, , minute/hour components flash when they're updated.
does have experience or have ideas? tend over-complicate things when left in vacuum thought i'd reach out , perspective.
p.s. i'm using monitor/control beer brewing equipment, 30 second error after hour totally acceptable that's longest i'll ever "timing" in process.
thanks!
kcb
i'm converting seconds, minutes , hours string using dtostrf() , concatenating them ":" separator 1 composite string written lcd each pass through main loop. however, timer sort of "flashes" when it's written screen in white , rewritten in black after (in order clear pixels out next update of timer).
i wondering if best way circumvent break "00:00:00" composite string 3 separate components (one hour, 1 minute, , 1 second) , update components when necessary. way, second component flashing continuously, , minute/hour components flash when they're updated.
does have experience or have ideas? tend over-complicate things when left in vacuum thought i'd reach out , perspective.
p.s. i'm using monitor/control beer brewing equipment, 30 second error after hour totally acceptable that's longest i'll ever "timing" in process.
thanks!
kcb
hi
that's (and part of i've been doing far).
updating when necessary rid of flashing seconds indicator, you'd erase , rewrite new value once every second instead of every iteration.
so yours sounds plan me.
happy brewing !
quote from: kbarre123
i wondering if best way circumvent break "00:00:00" composite string 3 separate components (one hour, 1 minute, , 1 second) , update components when necessary. way, second component flashing continuously, , minute/hour components flash when they're updated.
that's (and part of i've been doing far).
updating when necessary rid of flashing seconds indicator, you'd erase , rewrite new value once every second instead of every iteration.
so yours sounds plan me.
happy brewing !
Arduino Forum > Using Arduino > Displays > LCD and refreshing a countdown timer - best practices?
arduino
Comments
Post a Comment