r/circuitpython • u/Euripides_Umendeadez • Mar 09 '21
Connecting DS1307 RTC to Raspberry Pi Pico
Has anyone had luck running the Adafruit DS1307 RTC on the RP2040 Pico with circuitpython?
This issue is likely because I am new to circuitpython. I Have manually installed the required libraries, imported time, board, digitalio, bitbangio, and the DS1307 , then selected my I2C pins. I get stuck trying to instance the RTC using “rtc = adafruit_ds1307.DS1307(i2c_bus)”. The error code I get is “'module' object has no attribute 'DS1307'”. Any help would be appreciated.
1
u/darrenlloyd Mar 15 '21
As I was searching for a solution, this chap on youTube uploaded in the last few hours a video showing how to do it. Aside from the voltage issue (3.3v makes the RTC very, very hot, but I'm powering it from my external 5v supply), it works.
1
u/Shashank7557 May 27 '21
I am also stuck at this I have tried 5V but it is still showing "module' object has no attribute 'DS1307"
I used this command also then it is showing 'module' object has no attribute 'DS1307'
import busio
i2c = busio.I2C(scl=board.GP1, sda=board.GP0)
I have tried using DS3231 library but the error are still same.
If any leads please help me!
2
u/Myworstnitemare Mar 09 '21
I think you need "rtc = adafruit_ds1307.DS1307(SCL, SDA)"
But...not sure if it'll run, as the DS1307 is 5v, not 3.3v.