Skip to content

Commit 9d9fe91

Browse files
authored
Merge pull request #198 from kattni/cpx-express-lib
Added shake threshold code
2 parents aa0c7b5 + 038de5e commit 9d9fe91

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from adafruit_circuitplayground.express import cpx
2+
3+
while True:
4+
if cpx.shake(shake_threshold=20):
5+
print("Shake detected!")
6+
cpx.red_led = True

0 commit comments

Comments
 (0)