Skip to content

Commit 3576f80

Browse files
authored
Merge pull request #47 from adafruit/ladyada-patch-2
Update spinner.py
2 parents 377910d + 0a2e667 commit 3576f80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/spinner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def get_position(self, delta):
9494
if clicksrc & 0b01000000 > 0:
9595
# Click was detected! Quickly read 32 values from the accelerometer
9696
# FIFO and look for the maximum magnitude values.
97-
maxval = lis3dh.acceleration[0] # Grab just the X acceleration value.
97+
maxval = abs(lis3dh.acceleration[0]) # Grab just the X acceleration value.
9898
for i in range(31):
9999
x = abs(lis3dh.acceleration[0])
100100
if x > maxval:

0 commit comments

Comments
 (0)