Skip to content

Commit 40e5d08

Browse files
authored
Merge pull request #3192 from adafruit/duplo_update
update folder name
2 parents 7172849 + 03d59f7 commit 40e5d08

16 files changed

Lines changed: 4 additions & 1 deletion

File tree

Duplo_Color_Boombox/code.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@
2727
storage.mount(vfs, "/sd", readonly=True)
2828

2929
#Audio
30-
mp3 = audiomp3.MP3Decoder(open("/sd/blue.mp3", "rb"))
30+
try:
31+
mp3 = audiomp3.MP3Decoder(open("/sd/blue.mp3", "rb"))
32+
except OSError as error:
33+
print(f"{error} - did you put the mp3 files on the micro SD card?")
3134

3235
i2s = audiobusio.I2SOut(board.I2S_BIT_CLOCK, board.I2S_WORD_SELECT, board.I2S_DATA)
3336
mixer = audiomixer.Mixer(voice_count=1, sample_rate=mp3.sample_rate, channel_count=1,
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)