Page 1 of 1

Connecting DS3231 RTC with ESP8266

Posted: Thu Nov 22, 2018 8:13 pm
by lazarvgd
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 :)

Re: Connecting DS3231 RTC with ESP8266

Posted: Fri Nov 23, 2018 5:49 am
by shaoziyang
You may try my lib for DS3231 module.

https://github.com/micropython-Chinese- ... isc/DS3231

Re: Connecting DS3231 RTC with ESP8266

Posted: Mon Nov 26, 2018 9:22 am
by lazarvgd
thanks :)

Re: Connecting DS3231 RTC with ESP8266

Posted: Mon Mar 11, 2019 7:34 am
by Nikunj_Vadher
shaoziyang wrote:
Fri Nov 23, 2018 5:49 am
You may try my lib for DS3231 module.

https://github.com/micropython-Chinese- ... isc/DS3231
>>> ds.Date()
[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.

Re: Connecting DS3231 RTC with ESP8266

Posted: Sun Mar 17, 2019 1:50 pm
by shaoziyang
It maybe a mistake in demo code, I will test it later.