Using a RTC (real time clock) that every once in a while returns an incorrect time.
It happens maybe once or twice a day, but when it happens it messes up my code : (
Does anyone have any tips or tricks for this problem? Searching didn't bring up anything on this specific type of problem.
I will try to decrease the error entering my code with constrain() and >=. Trying to keep the time within proper limits based on current minute and hour. But that probably won't catch all possible errors.
I don't think averaging is a good solution. So I'm wondering if anyone has a better idea.
An example of the error would be the time samples returning like this:
(24hour clock) 14:01 14:02 2:28 14:03 14:04
The error could be the chip returning the date instead of the time, but that doesn't matter. I just want to correct the error in case of any incorrect return. (bad signal for example)
Thanks for any help : )