Skip to content

Commit 180be6f

Browse files
committed
src: Use was_pressed in test_record.py.
Signed-off-by: Damien George <[email protected]>
1 parent 3639146 commit 180be6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test_record.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
my_track = None
2727

2828
while True:
29-
if button_a.is_pressed():
29+
if button_a.was_pressed():
3030
my_track = microphone.record_into(my_recording, wait=False)
3131
display.show([mouth_open, mouth_closed], loop=True, wait=False, delay=150)
3232
while button_a.is_pressed() and microphone.is_recording():
@@ -37,7 +37,7 @@
3737
sleep(50)
3838
display.clear()
3939
my_track *= 2 # amplify volume
40-
if button_b.is_pressed() and my_track:
40+
if button_b.was_pressed() and my_track:
4141
audio.play(my_track, wait=False)
4242
level = 0
4343
while audio.is_playing():

0 commit comments

Comments
 (0)