RTC DS3231 module Pi Pico Error ??

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Jamesmaclean
 
Posts: 7
Joined: Fri Oct 30, 2020 10:51 pm

RTC DS3231 module Pi Pico Error ??

Post by Jamesmaclean »

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

User avatar
tannewt
 
Posts: 3315
Joined: Thu Oct 06, 2016 8:48 pm

Re: RTC DS3231 module Pi Pico Error ??

Post by tannewt »

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

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

Re: RTC DS3231 module Pi Pico Error ??

Post by Jamesmaclean »

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

User avatar
tannewt
 
Posts: 3315
Joined: Thu Oct 06, 2016 8:48 pm

Re: RTC DS3231 module Pi Pico Error ??

Post by tannewt »

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

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”