Skip to content

Commit 03d59f7

Browse files
committed
update folder name
1 parent 7172849 commit 03d59f7

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)