Connecting DS3231 RTC with ESP8266

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
lazarvgd
Posts: 39
Joined: Sun May 20, 2018 8:57 am

Connecting DS3231 RTC with ESP8266

Post by lazarvgd » Thu Nov 22, 2018 8:13 pm

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 :)

shaoziyang
Posts: 363
Joined: Sun Apr 17, 2016 1:55 pm

Re: Connecting DS3231 RTC with ESP8266

Post by shaoziyang » Fri Nov 23, 2018 5:49 am

You may try my lib for DS3231 module.

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

lazarvgd
Posts: 39
Joined: Sun May 20, 2018 8:57 am

Re: Connecting DS3231 RTC with ESP8266

Post by lazarvgd » Mon Nov 26, 2018 9:22 am

thanks :)

Nikunj_Vadher
Posts: 14
Joined: Mon Dec 10, 2018 6:37 am

Re: Connecting DS3231 RTC with ESP8266

Post by Nikunj_Vadher » Mon Mar 11, 2019 7:34 am

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.

shaoziyang
Posts: 363
Joined: Sun Apr 17, 2016 1:55 pm

Re: Connecting DS3231 RTC with ESP8266

Post by shaoziyang » Sun Mar 17, 2019 1:50 pm

It maybe a mistake in demo code, I will test it later.

Post Reply