Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Many people have noticed that the 4x20 LCD display flickers and produces washed out, blurred text when values are changing quickly. This change significantly improves display quality by removing the flicker, though fast changing value are still a little blurry simply due to the slow update speed of these displays.
The cause of the flicker this the lcd.clear() command which is being issued on every loop iteration, so the entire display is cleared and then re-drawn. With the slow update speed of the LCD this results in flicker. The clear command is quite slow (~1.5ms) so removing this also benefits LCD update execution time. This time is further reduced by using a simple state machine to update only one parameter per loop iteration.
The state machine approach has not been applied to the OLED code (since I don't have one to test) but would be simple to do so and would decrease the execution time.