We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f29dccd commit bef9447Copy full SHA for bef9447
adafruit_circuitplayground/express.py
@@ -116,7 +116,10 @@ def __init__(self):
116
# Define acceleration:
117
self._i2c = busio.I2C(board.ACCELEROMETER_SCL, board.ACCELEROMETER_SDA)
118
self._int1 = digitalio.DigitalInOut(board.ACCELEROMETER_INTERRUPT)
119
- self._lis3dh = adafruit_lis3dh.LIS3DH_I2C(self._i2c, address=0x19, int1=self._int1)
+ try:
120
+ self._lis3dh = adafruit_lis3dh.LIS3DH_I2C(self._i2c, address=0x19, int1=self._int1)
121
+ except TypeError:
122
+ self._lis3dh = adafruit_lis3dh.LIS3DH_I2C(self._i2c, address=0x19)
123
self._lis3dh.range = adafruit_lis3dh.RANGE_8_G
124
125
# Initialise tap:
0 commit comments