JChristensen / DS3232RTC

Arduino Library for Maxim Integrated DS3232 and DS3231 Real-Time Clocks
GNU General Public License v3.0
392 stars 135 forks source link

Display glitches #80

Closed EddieGreen closed 4 years ago

EddieGreen commented 4 years ago

I've created a clock display updated every 0.5 seconds. The hardware includes a light sensor,an RTC and a TM1637 clock module with an Arduino Nano.

I've noticed glitches in the display - a momentary flickering between the expected time and a bright first digit 0 at random and for much smaller than the update frequency.

In addition I saw digits change values to another value for the two middle digits, in time with the update frequency.

Both could be an error in coding at my end, except that adding a delay between the display instructions seems to have fixed these issues...

...
    if(millis() - lastTimeUpdate > 500)
    {
        ...
        digits.display(timeDisplayString);
        delay(1); // delay seems to fix display glitches
        digits.switchColon();
        delay(1);
        digits.setBrightness(lightLevel);
     }
 ...

Any thoughts?

EddieGreen commented 4 years ago

Update: While this fixes the inconsistent display of digits, the occasional bright first digit continues although at a much reduced rate (like once in 10 minutes of watching)

EddieGreen commented 4 years ago

My apologies, this issue should have been in a different Github for the clock display driver. please disregard/delete.