We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 015b1f3 commit 708341dCopy full SHA for 708341d
CircuitPython_LED_Sand_Hourglass/single_matrix/code.py
@@ -14,8 +14,13 @@
14
i2c = board.I2C() # uses board.SCL and board.SDA
15
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
16
17
-# the accelo
18
-accelo = adafruit_lsm6ds.lsm6ds33.LSM6DS33(i2c)
+# check for LSM6DS33 or LSM6DS3TR-C (Adafruit Feather Sense)
+try:
19
+ from adafruit_lsm6ds.lsm6ds33 import LSM6DS33 as LSM6DS
20
+ lsm6ds = LSM6DS(i2c)
21
+except RuntimeError:
22
+ from adafruit_lsm6ds.lsm6ds3 import LSM6DS3 as LSM6DS
23
24
25
# the matrix
26
matrix = matrix.Matrix8x8(i2c, 0x70)
0 commit comments