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