Update code.py

wait for audio before moving arm
This commit is contained in:
Mike Barela 2018-07-11 15:17:45 -04:00 committed by GitHub
parent eac502a282
commit 328752ffb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)