Skip to content

Display flickers when using print method with decimal point or colon. #16

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
MarkMoss opened this issue Jun 1, 2023 · 2 comments
Closed

Comments

@MarkMoss
Copy link

MarkMoss commented Jun 1, 2023

Subject of the issue

Display flickers when using print method with string containing decimal point or colon.

Your workbench

  • Using SparkFun RedBoard Qwiic with one SparkFun Qwiic Alphanumeric Display.
  • Powered via USB.
  • Using Arduino 1.8.19.

Steps to reproduce

Run the sketch below:

#include <SparkFun_Alphanumeric_Display.h>

HT16K33 display;

void setup() {
  Wire.begin();
  display.begin();
}

void loop() {
  display.print("12:34"); 
}

Expected behavior

The four digits on the display should display "1234" and the colon segment should be illuminated.

Actual behavior

The last two digits, containing "34" flicker perceptibly, while the first two digits and the colon segment are on steadily. Other than the flicker, the display is correct.

@sfe-SparkFro
Copy link
Contributor

sfe-SparkFro commented Jun 5, 2023

Thanks for the bug report! I can confirm the display flickers with the provided code, which is caused by setColonOnOff() updating the display before the remaining segments have been set in displayRAM. Will implement a fix shortly!

sfe-SparkFro added a commit that referenced this issue Jun 5, 2023
`write()` functions end up calling `updateDisplay()` multiple times if colons or decimal points are included in input string, which can cause flickering when called repeatedly. Fix is to add a parameter to `setDecimalOnOff()` and`setColonOnOff()` for whether to call `updateDisplay()`, which defaults to true to maintain backwards compatibility.
@sfe-SparkFro
Copy link
Contributor

Fixed with v2.2.7. Thanks again!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants