Seeking advice on capturing time-stamped data
-
Hi all
I wish to record readings at 1 second intervals to the SD card using wipy/expansion board. For the time stamp I can usertc.now()
but there is no way to set thertc.init()
to be the true time, therefore if the board resets, I will have duplicate time-stamps. How do people recommend I deal with this?
Thanks
-
@robmarkcole After reset, just pickup the last time stamp from the SD cards' data file. That wouldn't give you a precise time but no problems with duplicates.
-
Thanks @robert-hh
-
@robmarkcole If you have Internet access, you can use rtc.ntp_sync(). Anyhow you should re-sync the RTC often, since it normally is driven by the internal RC oscillator, which is not too precise. You could also add an external RTC, or use the GPS clock of pytrack, if available..