Skip to content

Commit bef9447

Browse files
committed
Update for backwards compatibility
1 parent f29dccd commit bef9447

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

adafruit_circuitplayground/express.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,10 @@ def __init__(self):
116116
# Define acceleration:
117117
self._i2c = busio.I2C(board.ACCELEROMETER_SCL, board.ACCELEROMETER_SDA)
118118
self._int1 = digitalio.DigitalInOut(board.ACCELEROMETER_INTERRUPT)
119-
self._lis3dh = adafruit_lis3dh.LIS3DH_I2C(self._i2c, address=0x19, int1=self._int1)
119+
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)
120123
self._lis3dh.range = adafruit_lis3dh.RANGE_8_G
121124

122125
# Initialise tap:

0 commit comments

Comments
 (0)