Specifically a DS3231 from your favourite internet auction site. The code is here
https://github.com/scudderfish/uDS3231 and you can use it like this :-
Code: Select all
MicroPython v1.5-1-ge954604 on 2015-10-21; WiPy with CC3200
Type "help()" for more information.
>>> import time
>>> from DS3231 import DS3231
>>> time.localtime()
(2015, 1, 1, 0, 0, 20, 3, 1)
>>> DS3231().loadTime()
>>> time.localtime()
(2015, 11, 5, 17, 44, 15, 3, 309)
>>>
Accurate timekeeping without a network connection. Still version 0.1, I need to add error checking to the saveTime() method, and also get the temperature data out of it as you can never have too many temperature sensors.
Regards,
David