-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Does anyone know a good way of porting this library to work in a CircruitPython environment instead of MicroPython?
I started with this:
import sys
import time
import motoron
import board
import busio
from microcontroller import Pin
from adafruit_bus_device.i2c_device import I2CDevice
DEVICE_ADDRESS = 0x10 # device address of DS3231 board
bus = busio.I2C(board.IO15, board.IO7)
device = I2CDevice(bus, DEVICE_ADDRESS)
mc = motoron.MotoronI2C(bus=device)
but I am running into this:
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Traceback (most recent call last):
File "code.py", line 45, in <module>
File "/lib/motoron.py", line 363, in reinitialize
File "/lib/motoron.py", line 1744, in _mpy_send_command_core
AttributeError: 'I2CDevice' object has no attribute 'writeto'
Metadata
Metadata
Assignees
Labels
No labels