adafruit / Adafruit_CircuitPython_DS3231

Adafruit CircuitPython drivers for the DS3231 realtime clock.
MIT License
21 stars 19 forks source link

AttributeError: 'module' object has no attribute 'ds3231' #17

Closed soneups closed 5 years ago

soneups commented 5 years ago

Using an ItSyBitsy M4 connected to this RTC https://learn.adafruit.com/ds3231-precision-rtc-featherwing/overview

I'm seeing AttributeError: 'module' object has no attribute 'DS3231'

after the command ds3231 = adafruit_ds3231.DS3231(i2c)

If i i2c.scan() I CAN SEE the device ok [0x68] 104

the adafruit_ds3231 library imports fine but it does appear to only be one file.... the library i copied to CircuitPython is here https://github.com/adafruit/Adafruit_CircuitPython_DS3231

i have disabled the code.py and just trying these command via Putty/REPL this is the complete code import board import busio import adafruit_ds3231 Import time

i2c = busio.I2C(board.SCL, board.SDA) ds3231 = adafruit_ds3231.DS3231(i2c)

Ds3231.datetime

soneups commented 5 years ago

I have now loaded the entire library set and it appears to be working ok - so closing for now.