Streaming audio from web links onto my Pirate Audio

I would think that should be doable. Both are DAC’s and it’s just a custom VLC radio install. I have the phat Beat Pirate radio, setup to do just that. I think you’ll have some tinkering to do get the buttons to work on the Pirate Audio like they do on the pHat Beat version though. Some use the same GPIO some don’t.
If it was me I’d install the following and see what happens. Use a spare SD card and just install the basic Pirate Audio driver first. Do what’s here up to but not including the Using
spotify part. Just install the display driver and do the config.txt edit for the DAC.


then follow this guide.

If you get one of the default radio stations playing, to play you can keep going and tinker with the button config etc. If you get no sound, then its decision time. Kepp plugging away or give up.

I’ll give that a try and see what happens. I see what you mean, since both are DACs and both run on the Raspberry Pi Zero, I wonder if just setting it up as a Pirate Radio pHAT BEAT with a few changes to accommodate the pushbutton volume up/down (which would probably be easy to do just to find the PINOUTS for the B and Y buttons on the Pirate Audio board), adding the drivers for the display, etc. I feel that it might not be too complicated to get to work, and thank you for the tips.

The pinouts are here,

I would follow the install instructions for the Pirate Audio, for the DAC and maybe the screen. You don’t need the screen to play some music so you could skip that part and do it latter.
Then do “just” the(Pirate Radio) VLC radio install and see what happens.
If you get sound then keep plugging away at it.
I have that display, the breakout garden version of it. Only tinkered a bit with it to make sure it was defect free. I haven’t put it to any real use yet.
I’m listening to my Pirate Radio playing my favorite classic rock as I type this. I have a Pirate Audio on my wish list.

If you get a “OS not supported” error message when trying to install that custom VLC Radio let me know and I’ll post the fix.

I think I’m getting close. I got the audio driver to work so I know the DAC side of the equation is right, and I was able to load the http addresses of a station or two and they played just fine. I haven’t tried to map the buttons yet, but that should be an easy process I would think once I set my mind to it.

I haven’t had any luck getting the display to work yet, even though I believe I’ve loaded the right drivers for the st7789 display. That’s baffling to me, as I know I must be missing the smallest detail.

Thanks again for your help on my project, I feel like I’m just a few lines of code away from making it work.

Maybe this will help, it’s the same display, just a few of the pins need to be changed in the examples to make it work on the Pirate Radio. The backlight for example.
Make sure SPI is enabled in Raspberry Pi Configuration.

On the Pirate Audio it uses SPI0, CE1, and the backlight is GPIO 13 (physical pin 33)
In the python example this “should” work
port=0,
cs=1,
dc=9,
backlight=13,

This is so frustrating because I feel that I’m so close to making this work for my needs. I’m now wondering if maybe I can use Mopidy (through Isis I suppose) and one if its extensions to link to online http:// addresses for the stations I want to listen to instead of actual music files. The display now works, the DAC audio works, I haven’t mapped out the four buttons yet but I think that’ll be easy. Thanks for your help on this, and I haven’t given up yet - just a little frustrated that I’m probably missing just the most minor of steps.

You can replace the Pimoroni supplied playlist in VLC Radio with your own. It’s what I do.
I just copy mine to the boot partition of the SD card. You can do this on a Windows PC, just ignore the “there is a problem with this media” message that pops up, do not let windows format it. When you boot that Pi back up your playlist will be moved and become the new default playlist.
My entries for my playlist.m3u file go like this

#EXTM3U
#EXTINF:-1,(#1 - 21/500) Classic Rock 109
http://198.27.70.26:10042/stream

That sounds just like what I’m looking for, thanks. I’ll give it a try when I get home from work tonight.

On the pHatBeat, the fast forward >> and rewind << are the ones that switch stations up and down. On boot up VLC Radio will play the first entry in the list. After that, if you switch stations it “should” play the last one that was playing when you shut down.
Mine didn’t always do that, not until I checked the box for “wait for network” in raspi-config. If my WIFI was slow to connect it would start going through the list until it got a working feed. Kind of confused me for a while, as I have no display showing what station it was tuned to?
I run PiOS with Desktop, I just find it easier to set everything up from a GUI. When I’m all done and ready for my tunes I just set it to boot to command line in raspi-config. Then run headless after that. If I need to tweak something I just connect a monitor and keyboard and do a sudo startx

@chuckvideo I like what you are doing. Did you succeed doing it your way?
In my case, I used mpd + rompR (copylaradio french howto) to have a web interface for my stream (even record tracks)

I haven’t fully succeeded yet, work got in the way and I got sidetracked. But I’m going to check out that rompR path and see where it takes me. I feel that I’m so close.

I’m not sure if this will help but I should be getting a Pirate Audio Speaker in the next day or two. I will be using it with my itty bitty beat box first though as its replacing the Speaker phat that’s there.
Once I have that all running I may swap SD cards and have a go at getting Pirate Radio running on it. Might be a few days before that happens though.

Looking forward to what you find out by getting Pirate Radio running on your Pirate Audio Speaker. I feel that I’m so close, and once work settles in I should have more time to see what I can find out as well.

I should be trying Pirate Radio on it by the end of the week. As far as I know I’ll have it tomorrow some time. I’m trading something else for one and he’s dropping by tomorrow for the swap. Then a day maybe to get the itty bitty beat box working. All I want on that is sound and button functions for shutdown and maybe volume up down. The display being put to use can wait for another day. Once that’s done I’ll swap in a new SD card and see if I can get vlc-radio usable on it. Sound anyway, then mess with the buttons etc.

I followed the Pirate Audio Learn section, went as far as installing Mopidy.
The screen works, its showing the visit http etc message and it looks like the Volume UP down work? The slider moves when I press the button.
I haven’t tried to install the Pirate radio yet, wondering if that is going to mess up the buttons?
I tried to play some tunes (internet stream) via VLC but only got silence?

IMHO, installing the Pirate Radio custom VLC-Radio is NOT the way forward.
It installs a whole bunch of stuff you don’t need and likely don’t want. The pHat Beat software and Pi-VU for starters. It breaks some of the buttons too. Volume down still worked but volume up didn’t. I didn’t get any tunes either?
I know the Pirate Audio works by the way. I played drum and piano sounds through it on my itty bitty beat box.
Installing Mopidy may be debatable also, although it does get the display working, all that Iris stuff doesn’t thrill me though?

Writing all this down for when I start working on my Pirate Audio and as I try to have it receive streaming radio stations.

My itty bitty beat box won’t work with the Pirate Audio either. The Piano plays OK when run from Thonny, and the drums play OK when run from Thonny. Try to run them both with that custom bash file and the second one that loads breaks the first one. I swapped the two entries around and it switches, drums work piano doesn’t, then piano works and drums don’t. I gave away my only Speaker phat so I’m stuck now. Pimoroni discontinued them. Sorry for the off topic rant, It’s been that kind of day.
I’ve been messing with this Pirate Audio board all day and pretty well got no where meaningful.
I may have another go at trying to get Pirate Radio on the Pirate Audio, I’m likely going to wait and see how you guys make out first though, I wiped that SD card to start over from scratch.