I’m relatively new to programming and Arduino so bear with me! I’m making a project that’s a countdown to Christmas clock for my girlfriend. She likes Christmas (a lot). So I’m using an Arduino, an DS3231 RTC, and right now an Adafruit 1.8" TFT. Code is appended below. There’s a few things I’ve noticed during testing.
- My timer loses about 12 seconds per day. I thought this RTC would be more accurate than that, many resources said it’d be within a minute or two per day. Is something in my code causing this?
a) I’ve noticed that the screen sometimes visibly lags between seconds (as in, the screen displays an arbitraty second for like, 1.2 seconds instead of 1.0 seconds
When the hours drops below 1 (it’s past 11pm) the number of hours displayed disappears off the screen rather than displaying 0 hours. This does not happen with the minutes or seconds display. I can’t figure out why this happens.
Feel free to suggest any areas of this code you think I could improve on!
video: - YouTube
code: is attached because I exceeded the character length limit I guess.
Countdown_Clock_10-23.2.ino (9.39 KB)