Skip to content

Commit ebe5826

Browse files
authored
Add dreidel shake threshold
Add dreidel shake threshold
2 parents eebb3ba + b59c560 commit ebe5826

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

TFT_Gizmo_Dreidel/dreidel.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
from adafruit_circuitplayground.bluefruit import cpb
66
from adafruit_gizmo import tft_gizmo
77

8+
SHAKE_THRESHOLD = 20
9+
810
#pylint: disable=bad-continuation
911
# define melody to play while spinning (freq, duration)
1012
melody = (
@@ -56,7 +58,7 @@
5658
tile = 0
5759
while True:
5860
# wait for shake
59-
while not cpb.shake():
61+
while not cpb.shake(shake_threshold=SHAKE_THRESHOLD):
6062
pass
6163
# play melody while "spinning" the symbols
6264
for note, duration in melody:

0 commit comments

Comments
 (0)