File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
CircuitPython_LED_Sand_Hourglass/single_matrix Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 4
4
5
5
import time
6
6
import board
7
- import adafruit_lsm6ds .lsm6ds33
8
7
from adafruit_ht16k33 import matrix
9
8
import matrixsand
10
9
14
13
i2c = board .I2C () # uses board.SCL and board.SDA
15
14
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
16
15
17
- # the accelo
18
- accelo = adafruit_lsm6ds .lsm6ds33 .LSM6DS33 (i2c )
16
+ # check for LSM6DS33 or LSM6DS3TR-C (Adafruit Feather Sense)
17
+ try :
18
+ from adafruit_lsm6ds .lsm6ds33 import LSM6DS33 as LSM6DS # pylint: disable=unused-import
19
+ accelo = LSM6DS (i2c )
20
+ except RuntimeError :
21
+ from adafruit_lsm6ds .lsm6ds3 import LSM6DS3 as LSM6DS # pylint: disable=unused-import
22
+ accelo = LSM6DS (i2c )
19
23
20
24
# the matrix
21
25
matrix = matrix .Matrix8x8 (i2c , 0x70 )
You can’t perform that action at this time.
0 commit comments