File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
adafruit_circuitplayground Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,6 @@ def acceleration(self):
88
88
"""
89
89
return self ._lis3dh .acceleration
90
90
91
- @property
92
91
def shake (self ):
93
92
"""Detect when device is shaken.
94
93
@@ -100,8 +99,8 @@ def shake(self):
100
99
from adafruit_circuitplayground.express import cpx
101
100
102
101
while True:
103
- if shake():
104
- print("Shake detected!")
102
+ if cpx. shake():
103
+ print("Shake detected!")
105
104
106
105
The `shake_threshold` default is 30. Decreasing this number increases
107
106
shake sensitivity, i.e. the code will return a shake detected more
@@ -115,10 +114,10 @@ def shake(self):
115
114
from adafruit_circuitplayground.express import cpx
116
115
117
116
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!")
120
119
"""
121
- return self ._lis3dh .shake
120
+ return self ._lis3dh .shake ()
122
121
123
122
124
123
@property
You can’t perform that action at this time.
0 commit comments