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.
2 parents 377910d + 0a2e667 commit 3576f80Copy full SHA for 3576f80
examples/spinner.py
@@ -94,7 +94,7 @@ def get_position(self, delta):
94
if clicksrc & 0b01000000 > 0:
95
# Click was detected! Quickly read 32 values from the accelerometer
96
# FIFO and look for the maximum magnitude values.
97
- maxval = lis3dh.acceleration[0] # Grab just the X acceleration value.
+ maxval = abs(lis3dh.acceleration[0]) # Grab just the X acceleration value.
98
for i in range(31):
99
x = abs(lis3dh.acceleration[0])
100
if x > maxval:
0 commit comments