Added shake threshold code
This commit is contained in:
parent
b4879da5ec
commit
038de5ea29
1 changed files with 6 additions and 0 deletions
|
|
@ -0,0 +1,6 @@
|
|||
from adafruit_circuitplayground.express import cpx
|
||||
|
||||
while True:
|
||||
if cpx.shake(shake_threshold=20):
|
||||
print("Shake detected!")
|
||||
cpx.red_led = True
|
||||
Loading…
Reference in a new issue