andydoro / WordClock-NeoMatrix8x8

Wordclock using NeoMatrix 8x8
http://andydoro.com/wordclockdesktop/
MIT License
39 stars 22 forks source link

Initial time of clock hard-coded when uploading? #5

Closed buffetboy2001 closed 3 years ago

buffetboy2001 commented 4 years ago

Thanks for this great project and the write-up in Make magazine. My son & I decided it would make a great first Arduino project and are now up and running with very few hitches. Online tutorial on adafuit is good.

One thing did surprise me that I want to confirm and document here (or else let you correct my understanding). We've noticed that the clock has the correct time when we upload the software (via Arduino IDE v1.8.13), but that if we then unplug the clock and let it sit off-power for a bit, then plug it in again -- it thinks the time of day is the same as when we uploaded the software. This leads me to believe that the initial time of day is being hardcoded at the time of upload. And that this setup() call below is pulling that hardcoded time as it starts watching increments from the RTC. Am I getting this correct? Or is this behavior unexpected from your perspective?

https://github.com/andydoro/WordClock-NeoMatrix8x8/blob/8de888211be5265f7b29bf51d57be477884a8d07/WordClock_NeoMatrix8x8/WordClock_NeoMatrix8x8.ino#L157

Running the recommended hardware and: RTClib v_latest DST_RTC v1.0.0 (not v1.1.1 due to bug I reported) Adafruit_GFX v_latest Adafruit_BusIO v_latest Adafruit_NeoPixel v_latest Adafruit_NeoMatrix v_latest

andydoro commented 3 years ago

That should not happen unless the RTC is not working properly. If the RTC is detected as "not running" in the setup loop, the RTC is programmed with the date and time from the last upload. I would check to make sure the RTC is running correctly with a working battery.