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 167227a commit 93d6749Copy full SHA for 93d6749
CLUE/Clue_Step_Counter/code.py
@@ -9,15 +9,20 @@
9
from simpleio import map_range
10
from adafruit_bitmap_font import bitmap_font
11
from adafruit_lsm6ds.lsm6ds33 import LSM6DS33
12
+from adafruit_lsm6ds.lsm6ds3trc import LSM6DS3TRC
13
from adafruit_lsm6ds import Rate, AccelRange
14
from adafruit_progressbar.progressbar import ProgressBar
15
from adafruit_display_text.label import Label
16
17
# turns off onboard NeoPixel to conserve battery
-clue.pixel.brightness = (0.0)
18
+clue.pixel.brightness = 0.0
19
20
# accessing the Clue's accelerometer
21
sensor = LSM6DS33(board.I2C())
22
+try:
23
+ sensor = LSM6DS33(board.I2C())
24
+except RuntimeError:
25
+ sensor = LSM6DS3TRC(board.I2C())
26
27
# step goal
28
step_goal = 10000
0 commit comments