Due to high demand, expect some shipping delays at this time - orders may not ship for up to 2-3 business days.
0

RTC DS3231 module Pi Pico Error ??
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

RTC DS3231 module Pi Pico Error ??

by Jamesmaclean on Fri Jan 21, 2022 5:44 pm

Circuitpython on the Pico seems to have a Problem with the Adafruit_DS3231 Module??

This is the Error message I see from this code.
Any help would be appreciated....
( How do I post a Screenshot here ?)

# print the current date and time every second. Notice also comments to adjust
# for working with hardware vs. software I2C.

import time
import board
import busio
import adafruit_ds3231

#sda=board.GP16
#scl=board.GP17

i2c = busio.I2C(board.GP16, board.GP17)
rtc = adafruit_ds3231.DS3231(i2c)

# Lookup table for names of days (nicer printing).
days = ("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")


>> %Run -c $EDITOR_CONTENT
Traceback (most recent call last):
File "<stdin>", line 12, in <module>
File "adafruit_ds3231.py", line 49, in <module>
ImportError: no module named 'adafruit_register'



Thanks James

Jamesmaclean
 
Posts: 7
Joined: Fri Oct 30, 2020 10:51 pm

Re: RTC DS3231 module Pi Pico Error ??

by tannewt on Fri Jan 21, 2022 8:49 pm

You'll need to install the `adafruit_register` library on the CIRCUITPY drive. Instructions here: https://learn.adafruit.com/welcome-to-c ... -libraries

tannewt
 
Posts: 2907
Joined: Thu Oct 06, 2016 8:48 pm

Re: RTC DS3231 module Pi Pico Error ??

by Jamesmaclean on Sat Jan 22, 2022 9:08 am

Great !

Thanks for the help, I assumed that the Adafruit_DS3231 Module was all that was needed.
Adding the other 2 to Lib solved it.

Using Circuitpython, how do I know the Error is a Missing Modules & which ones are needed ?

Thanks
James

Jamesmaclean
 
Posts: 7
Joined: Fri Oct 30, 2020 10:51 pm

Re: RTC DS3231 module Pi Pico Error ??

by tannewt on Mon Jan 24, 2022 6:33 pm

Missing modules will show as "ImportError". It could also mean that the module name has a typo or the module is in the wrong location.

This guide has a more thorough explanation: https://learn.adafruit.com/welcome-to-c ... 3105226-23

tannewt
 
Posts: 2907
Joined: Thu Oct 06, 2016 8:48 pm

Please be positive and constructive with your questions and comments.