/ examples / circuitplayground_shake.py
circuitplayground_shake.py
1  from adafruit_circuitplayground.express import cpx
2  
3  while True:
4      if cpx.shake(shake_threshold=20):
5          print("Shake detected!")