-
Notifications
You must be signed in to change notification settings - Fork 20
Closed
Description
The examples here currently default to hardware I2C with commented-out code for CPX, software I2C and hardware SPI.
It would be relatively simple enough to default to "CPX or hardware I2C":
if hasattr(board, 'ACCELEROMETER_SCL'):
i2c = busio.I2C(board.ACCELEROMETER_SCL, board.ACCELEROMETER_SDA)
else:
i2c = busio.I2C(board.SCL, board.SDA)
lis3dh = adafruit_lis3dh.LIS3DH_I2C(i2c, address=0x19)
This way the two most likely scenarios will Just Work™
(it would obviously need better documentation too)
Metadata
Metadata
Assignees
Labels
No labels