Page 1 of 1

DS1307 interfacing with sparkfun's the thing

Posted: Mon Aug 20, 2018 3:02 pm
by protein_sheikh
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?

Re: DS1307 interfacing with sparkfun's the thing

Posted: Mon Aug 20, 2018 8:40 pm
by fdufnews
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.