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 c0e9f43 commit fa0c95cCopy full SHA for fa0c95c
adafruit_pybadger.py
@@ -87,14 +87,12 @@ def __init__(self, i2c=None):
87
if i2c is None:
88
i2c = board.I2C()
89
int1 = digitalio.DigitalInOut(board.ACCELEROMETER_INTERRUPT)
90
- except RuntimeError:
91
- self._accelerometer = None
92
-
93
- if i2c is not None:
94
try:
95
self._accelerometer = adafruit_lis3dh.LIS3DH_I2C(i2c, address=0x19, int1=int1)
96
except ValueError:
97
self._accelerometer = adafruit_lis3dh.LIS3DH_I2C(i2c, int1=int1)
+ except RuntimeError:
+ self._accelerometer = None
98
99
# Buttons
100
self._buttons = GamePadShift(digitalio.DigitalInOut(board.BUTTON_CLOCK),
0 commit comments