232 / 1000 / 60 / 60 / 24 = ?
[Mod edit - strong language removed]
Original poster edit: What strong language?
232 / 1000 / 60 / 60 / 24 = ?
[Mod edit - strong language removed]
Original poster edit: What strong language?
There is a simple way of dealing with the wrap-around in your millis() calculations.
I think what the previous poster was trying to say is that millis() doesn't "break" when it rolls over, so that isn't why people use RTCs.
Rather, they use RTCs for the reasons you gave: they keep more accurate time, they keep time when powered down, and they are generally easier to use when you are working with actual dates and times.
I'm not going to reply to a specific post, because there was a sudden flurry of action
firstly, @anon73444976 , i'm sorry if I came off as aggressive, I merely wanted to have this conversation in a docile tone
and as for the 51 days thing, I was just quoting a number that I had gotten from somewhere else - i'm sorry for being 1.3 days off...
I think what the previous poster was trying to say is that millis() doesn't "break" when it rolls over, so that isn't why people use RTCs.
@SteveThackery yes, I know RTCs are used for more accurate timekeeping, and for keeping a reference while the arduino was off.
What I was originally trying to say is that you can use them for purposes where you need the absolute date and time rather than a relative time like millis - I know it is possible to use millis() as well as compile date/time to get the current epoch time, but it will be off when the arduino resets (as compiled time is from it's namesake, not the time that the arduino was turned on)
Thank you both for replying so quickly
[Mod edit - some of the above refers to comments I have removed, so apologies for the loss of context]
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.