Skip to content

Commit 8f06211

Browse files
committed
Updated with requested changes
1 parent 41bf6c0 commit 8f06211

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

adafruit_circuitplayground/express.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ def acceleration(self):
8888
"""
8989
return self._lis3dh.acceleration
9090

91-
@property
9291
def shake(self):
9392
"""Detect when device is shaken.
9493
@@ -100,8 +99,8 @@ def shake(self):
10099
from adafruit_circuitplayground.express import cpx
101100
102101
while True:
103-
if shake():
104-
print("Shake detected!")
102+
if cpx.shake():
103+
print("Shake detected!")
105104
106105
The `shake_threshold` default is 30. Decreasing this number increases
107106
shake sensitivity, i.e. the code will return a shake detected more
@@ -115,10 +114,10 @@ def shake(self):
115114
from adafruit_circuitplayground.express import cpx
116115
117116
while True:
118-
if shake(shake_threshold=20):
119-
print("Shake detected more easily than before!")
117+
if cpx.shake(shake_threshold=20):
118+
print("Shake detected more easily than before!")
120119
"""
121-
return self._lis3dh.shake
120+
return self._lis3dh.shake()
122121

123122

124123
@property

0 commit comments

Comments
 (0)