Update code.py
wait for audio before moving arm
This commit is contained in:
parent
eac502a282
commit
328752ffb1
1 changed files with 2 additions and 0 deletions
|
|
@ -12,6 +12,8 @@ def play_file(wavfile):
|
|||
audio_file = open(wavfile, "rb")
|
||||
wav = audioio.WaveFile(audio_file)
|
||||
speaker.play(wav)
|
||||
while speaker.playing:
|
||||
pass
|
||||
|
||||
# NeoPixels on the Circuit Playground Express Light Blue
|
||||
pixels = neopixel.NeoPixel(board.NEOPIXEL, 10, brightness=0.3)
|
||||
|
|
|
|||
Loading…
Reference in a new issue