Playing audio with the RaspBerry Pi Pico #10361
Replies: 2 comments 3 replies
-
@greenreader9 Sorry about the delay responding...
This is an important detail to clarify. What exactly is the "speaker". Sounds like you're actually driving something that expects a "line out" signal?
Yes. This could be made to work. You will need to do some research to figure out exactly what voltages and therefore which size resistor to use. If you need some help explaining the paragraphs from that repo then feel free to ask questions here! |
Beta Was this translation helpful? Give feedback.
-
The solution depends on the type of sounds you want to produce. PWM is OK for synthetic clicks, beeps and honks or simple monophonic tunes. If you want to play music, you'll need something better which will involve buying hardware. One approach is to use I2S with a cheap UDA1334 DAC board from eBay. This will play WAV files. For MP3 or FLAC you'll need a VS1053. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
Hopefully I picked the correct category, if not, my apologies.
I am trying to get a speaker connected to the Raspberry pi Pico W using MicroPython, but without much success.
I started with Bluetooth, but quickly ruled that out as the Pico W does not support it (At least without a lot of hacking) yet.
So wired then. My idea was to take a TS 3.5mm cable, cut it, and somehow connect it to the Pi. Since the speaker on the other end has a battery, signal strength should not be an issue, right? (I am a website developer, not an audio engineer). I really want to do this in MicroPython, since the rest of my code works well and I don't want to change it.
I came across this respiratory (https://github.com/danjperron/PicoAudioPWM), and it looks like it might work, but the first 4 paragraphs are totally confusing. (Would I be using a TRS 3.5mm cable with this)?
In conclusion, I'm really just trying to get some audio to play over a 3.5mm cable with the Pi Pico. Would the above linked GH respiratory be the way to go, and how would I wire up my speaker with it?
Thanks for any assistance you can offer!
Beta Was this translation helpful? Give feedback.
All reactions