An attempt to provide a Real Time Clock for the nRF51-DK. This code provides rtc.time and rtc.set_time replacements for the similarly named C standard methods (unimplemented for nRF51-DK last I checked). Not very well tested, but it seems to work for simple applications.

Dependents:   nRF51_rtc_example LoRa_PIR BLE_Lightning_sensor BLE_AlarmWatch ... more

Make update_rtc() an actual static method

...instead of an instance method.

This allows it to be used in ticker.attach.

An attempt to provide a Real Time Clock for the nRF51-DK. This code provides rtc.time and rtc.set_time replacements for the similarly named C standard methods (unimplemented for nRF51-DK last I … nRF51-DK, RTC, time

1 comment:

16 Apr 2015

Fixed clock drift

Calling time() often will cause clock drift by forgetting the fractional part of the seconds (ticks.) Fixed by offsettin rtc_previous by the number of "unused" ticks.