DS1307 interfacing with sparkfun's the thing

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
protein_sheikh
Posts: 3
Joined: Mon Aug 13, 2018 10:57 am

DS1307 interfacing with sparkfun's the thing

Post by protein_sheikh » Mon Aug 20, 2018 3:02 pm

hi,
I am trying to interface Grove-RTC module with ESP32 the thing. it has DS1307 chip on it, so im trying to use adafruit's urtc.py module

[code]
from machine import I2C, Pin
import urtc

i2c = I2C(scl = Pin(22), sda = Pin(21))
rtc = urtc.DS1307(i2c)
rtc.datetime()

[/code]

and i get this error

[code]
Traceback (most recent call list):
File "<stdin>", line 1, in <module>
File "urtc.py", line 60, in datetime
OSError: [Errno 19] ENODEV
[/code]

whenever i try to use i2c.scan i get empty []
what should i do?

fdufnews
Posts: 35
Joined: Mon Jul 25, 2016 11:31 am

Re: DS1307 interfacing with sparkfun's the thing

Post by fdufnews » Mon Aug 20, 2018 8:40 pm

Hi,
DS1307 is now an integrated circuit "from the past". It works on 5V, if you power it with 3.3V it may not work.
You'd better switch to a DS2321 wich is designed to work from 3.3V supply and is much more accurate.

Post Reply