Seeking advice on capturing time-stamped data
I wish to record readings at 1 second intervals to the SD card using wipy/expansion board. For the time stamp I can use
rtc.now()but there is no way to set the
rtc.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?
@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.
robert-hh last edited by 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..