Soft 404
Hey I'm new to this and can follow the wiring diagrams just fine, copy and paste just fine.
I have tried a couple of the code examples for mp3 playback that seem to work good, with the intent to make a noise or rain machine, but cant get the files to play in a loop.
------- original example -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"""
CircuitPython multiple MP3 playback example for Raspberry Pi Pico.
Plays two MP3 files consecutively, once time each.
"""
import board
import audiomp3
import audiopwmio
audio = audiopwmio.PWMAudioOut(board.GP0)
mp3files = ["rain1.mp3", "rain2.mp3"]
mp3 = open(mp3files[0], "rb")
decoder = audiomp3.MP3Decoder(mp3)
for filename in mp3files:
decoder.file = open(filename, "rb")
audio.play(decoder)
print("Playing:", filename)
while audio.playing:
pass
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks if you have a working idea.
Thanks that worked after about half hour, when I realized the T in true needed to be True, per your example.
Thanks again.
Thanks that worked after about half hour, when I realized the T in true needed to be True, per your example.
Thanks again.