Hi there,
I have been thinking about buying RTC module(i2c) to attach to my esp8266 for precise time and date.
There is a really cheap ds3231 rtc module and I am wondering is it possible to get time with micropython?
If the answer is yes, can somebody give me some references how to do that?
thanks
Connecting DS3231 RTC with ESP8266
-
- Posts: 363
- Joined: Sun Apr 17, 2016 1:55 pm
-
- Posts: 14
- Joined: Mon Dec 10, 2018 6:37 am
Re: Connecting DS3231 RTC with ESP8266
>>> ds.Date()shaoziyang wrote: ↑Fri Nov 23, 2018 5:49 amYou may try my lib for DS3231 module.
https://github.com/micropython-Chinese- ... isc/DS3231
[2000, 1, 1]
>>> ds.DateTime([2019,3,11,1,12,58,8])
>>> ds.Date()
[2019, 3, 11]
>>> ds.ALARM(12, 20, 10, ds.PER_DISABLE)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'DS3231' object has no attribute 'PER_DISABLE'
>>> ds.ALARM(ds,12, 20, 10, ds.PER_DISABLE)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'DS3231' object has no attribute 'PER_DISABLE'
>>> ds.ALARM(ds, 12, 20, 10, ds.PER_DISABLE)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'DS3231' object has no attribute 'PER_DISABLE'
Getting following error.
-
- Posts: 363
- Joined: Sun Apr 17, 2016 1:55 pm
Re: Connecting DS3231 RTC with ESP8266
It maybe a mistake in demo code, I will test it later.