Soft 404
Cool project, I've played a bit with that using FPGAs. I've never tried with MCUs, but FPGAs give you very tight timing control. I wonder if you can broadcast the audio signal.
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 for the good explanation. I learned alot and have alot to learn.
Alot of times I'll just get 5W or 15W class D amp boards https://www.amazon.com/Ximimark-1-8-12V-TDA2822M-Amplifier-Channel/dp/B07KC1CZWY/ref=sr_1_4?dchild=1&keywords=12v+amplif…
I cant build them nearly as cheap as buying them.
I have built LM386 boards and 5V relay cards, once, then found just the parts cost 2-3X as much as buying a prebuilt surface mount one.
Won't you need to close the files when they're no longer being used, or does Python handle that kind of thing for you?