# Pi Zero W, Pirate Radio and the PhatBeat

**URL:** <https://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat/4099>\
**Category:** Support\
**Created:** [March 1, 2017, 12:57pm UTC](https://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat/4099 "2017-03-01T12:57:01Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Feek](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/feek/32/2100_2.png) [@Feek](https://forums.pimoroni.com/u/Feek)\
**Post date:** [March 1, 2017, 6:16pm UTC](https://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat/4099/21 "2017-03-01T18:16:50Z")

</div>

Looking good, despite the upside down meter!  
I’m actually starting again - Any hints as to exactly what I need to run?

Sorry, I’m not having a good day.

---

<div class="post-metadata">

**Author:** ![MrJoshua](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/mrjoshua/32/2099_2.png) [@MrJoshua](https://forums.pimoroni.com/u/MrJoshua)\
**Post date:** [March 1, 2017, 6:17pm UTC](https://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat/4099/22 "2017-03-01T18:17:29Z")

</div>

Also, I have a request for a matching speaker so I can run it in stereo please :)

---

<div class="post-metadata">

**Author:** ![MrJoshua](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/mrjoshua/32/2099_2.png) [@MrJoshua](https://forums.pimoroni.com/u/MrJoshua)\
**Post date:** [March 1, 2017, 6:18pm UTC](https://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat/4099/23 "2017-03-01T18:18:56Z")

</div>

I just followed this to the letter:

> <https://gist.github.com/Gadgetoid/47d8f873fde39fcbe83e6dab0e855f72>
>
> There are more than three files. show original

There was one bit of VLC install that failed so I restarted it using the recommended repair command.

---

<div class="post-metadata">

**Author:** ![MrJoshua](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/mrjoshua/32/2099_2.png) [@MrJoshua](https://forums.pimoroni.com/u/MrJoshua)\
**Post date:** [March 1, 2017, 6:21pm UTC](https://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat/4099/24 "2017-03-01T18:21:37Z")

</div>

Oh, all the buttons work apart from the power button at the top of the Phatbeat (GPIO pin 12).

Is there a simple way to make this work?

---

<div class="post-metadata">

**Author:** ![Feek](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/feek/32/2100_2.png) [@Feek](https://forums.pimoroni.com/u/Feek)\
**Post date:** [March 1, 2017, 7:10pm UTC](https://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat/4099/25 "2017-03-01T19:10:43Z")

</div>

And yes, using the VLC method, it’s all working! It’s taken quite literally all day to get this far. I’ll just bung a handful of stations in the playlist file and I’m sorted. The VU meter is upside down though.

Thanks to everyone for their help.

One comment about the buttons on the pHAT Beat though. I’ve only pushed the ‘down’ button three or four times to reduce the volume from deafening level but it’s already broken. I was careful and only used my fingernail but it’s just not doing anything any more. Are there better quality buttons I can fit instead because I can see them all going very quickly.

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [March 1, 2017, 7:38pm UTC](https://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat/4099/26 "2017-03-01T19:38:34Z")

</div>

For the reversed VU Meter, If you edit `/etc/asound.conf` do you see a `bar_reverse` setting at all?

The buttons definitely shouldn’t break from just a few pushes, I haven’t been especially nice to my prototype. Did it pop off the board? There should be a liberal amount of solder in the mounting lugs to stop that.

Adding power-off functionality will be easy, and it should help prevent any shutdown corruption woes. I did wonder if there was a better use I could put it to, though, but I haven’t come up with one yet.

---

<div class="post-metadata">

**Author:** ![Feek](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/feek/32/2100_2.png) [@Feek](https://forums.pimoroni.com/u/Feek)\
**Post date:** [March 1, 2017, 8:05pm UTC](https://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat/4099/27 "2017-03-01T20:05:08Z")

</div>

No, that setting isn’t in the file.

Regarding the button, it’s not broken off the board, the button itself has folded inwards towards the board. I’ve tried to angle it back slightly but it’s really difficult. All the buttons are a bit stiff, this one has just gone.

/edit: Quick blast on [YouTube](https://www.youtube.com/watch?v=R0PGwHYqAzs).

[https://www.youtube.com/watch?v=R0PGwHYqAzs](https://www.youtube.com/watch?v=R0PGwHYqAzs)

---

<div class="post-metadata">

**Author:** ![sandyjmacdonald](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/sandyjmacdonald/32/393_2.png) [@sandyjmacdonald](https://forums.pimoroni.com/u/sandyjmacdonald)\
**Post date:** [March 1, 2017, 9:20pm UTC](https://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat/4099/28 "2017-03-01T21:20:08Z")

</div>

Just to add to this. We’ve now added support for pHAT BEAT to our airdac one-line-installer, meaning that if you have an iPhone you can stream audio to your Pirate Radio. The VU meter should work too.

Just run `curl https://get.pimoroni.com/airdac | bash` in the terminal, making sure that you select the pHAT BEAT option when prompted, and then you should see it pop up as an option on your iPhone’s Airplay list.

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [March 1, 2017, 9:42pm UTC](https://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat/4099/29 "2017-03-01T21:42:17Z")

</div>

@feek drop me a forum PM with your order number, and I’ll sort you out a replacement!

---

<div class="post-metadata">

**Author:** ![Georgejb75](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/georgejb75/32/2111_2.png) [@Georgejb75](https://forums.pimoroni.com/u/Georgejb75)\
**Post date:** [March 2, 2017, 4:38pm UTC](https://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat/4099/30 "2017-03-02T16:38:00Z")

</div>

Hi I was looking at the pirate radio in your store and looking at what tutorials and information you have on your website and on github.  
I’m a complete noob to pi/Linux/programming and electronics in general and the only programming I have done was on my zx81 back in the day, and that was entry level basic programming.  
Since finding the information that you have put out there, I have been put off purchasing the pirate radio because there seems to be not enough information for someone new to the field.  
Would this be a fair assumption to make or am i wrong?

---

<div class="post-metadata">

**Author:** ![Feek](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/feek/32/2100_2.png) [@Feek](https://forums.pimoroni.com/u/Feek)\
**Post date:** [March 2, 2017, 4:51pm UTC](https://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat/4099/31 "2017-03-02T16:51:40Z")

</div>

George, if you follow the instructions linked in [this](http://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat-os-not-supported/4099/23) post, you will have a working system. It won’t be fancy but it will work.

Mine has been playing, listening to Radio Caroline Flashback all day!

---

<div class="post-metadata">

**Author:** ![RogueM](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/roguem/32/311_2.png) [@RogueM](https://forums.pimoroni.com/u/RogueM)\
**Post date:** [March 2, 2017, 5:03pm UTC](https://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat/4099/32 "2017-03-02T17:03:21Z")

</div>

it is worth noting that the phat BEAT is about 3 days old… @sandyjmacdonald and @gadgetoid are working on tutorials and projects that will not require anything more than running a single command (more or less).

In fact, we now have a Dashboard product and we will add all the projects installers as they become available so in the near future you won’t even have to figure out what to install manually, just browse through a list.

The dashboard itself is available right now by running:

```
sudo apt-get update
sudo apt-get install pimoroni

```

… projects will be added in the next week or so (for some of our products, including at least one specifically for pHAT BEAT). All that to say, that, making things as easy as possible for people less inclined to figure out how to create working setups is definitely something we want to make possible.

---

<div class="post-metadata">

**Author:** ![Feek](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/feek/32/2100_2.png) [@Feek](https://forums.pimoroni.com/u/Feek)\
**Post date:** [March 3, 2017, 12:18am UTC](https://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat/4099/33 "2017-03-03T00:18:01Z")

</div>

Out of interest, did you find a way to get the VU meters back round the right way?

---

<div class="post-metadata">

**Author:** ![RogueM](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/roguem/32/311_2.png) [@RogueM](https://forums.pimoroni.com/u/RogueM)\
**Post date:** [March 3, 2017, 12:24am UTC](https://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat/4099/34 "2017-03-03T00:24:19Z")

</div>

I believe that is fixed yes - perhaps your repo is not up to date? cd into the ~/Pimoroni/pivumeter/ directory, which should exist on your system and `git pull`, then run the setup again, like so:

```
 ./setup.sh phat-beat

```

or, well, run the pHAT BEAT installer again, which will do that for you.

---

<div class="post-metadata">

**Author:** ![Feek](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/feek/32/2100_2.png) [@Feek](https://forums.pimoroni.com/u/Feek)\
**Post date:** [March 3, 2017, 12:29am UTC](https://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat/4099/35 "2017-03-03T00:29:58Z")

</div>

OK, running the installer again seemed the simplest option for me. I guess I’m going to get absolutely deafened when it restarts :D

/edit - Yes, that worked - The VU meters are now correct, thank you.

---

<div class="post-metadata">

**Author:** ![triviadave](https://avatars.discourse-cdn.com/v4/letter/t/71c47a/32.png) [@triviadave](https://forums.pimoroni.com/u/triviadave)\
**Post date:** [March 3, 2017, 6:09pm UTC](https://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat/4099/36 "2017-03-03T18:09:55Z")

</div>

Thanks for the instructions above, I have followed them through from a brand new install of raspbian lite and have had a couple of problems. I completed the instructions and then rebooted after the crontab instructions.

Nothing happened when I restarted (I am not sure if it should, but figured as much info as possible is useful), so I ran vlc.py in the vlc folder.

That didn’t seem to work either, and resulted in the following error message:

> Traceback (most recent call last):  
> File “vlc.py”, line 122, in   
> if vlc.start():  
> File “vlc.py”, line 102, in start  
> return\_value = subprocess.check\_output([‘./vlc.sh’])  
> File “/usr/lib/python2.7/subprocess.py”, line 566, in check\_output  
> process = Popen(stdout=PIPE, \*popenargs, \*\*kwargs)  
> File “/usr/lib/python2.7/subprocess.py”, line 710, in **init**  
> errread, errwrite)  
> File “/usr/lib/python2.7/subprocess.py”, line 1335, in \_execute\_child  
> raise child\_exception  
> OSError: [Errno 13] Permission denied

I wondered if it might be because I followed the python 3 instructions earlier, and did the pip2 installation as well as pip3, but it said the dependencies had already been met.

The hardware works, and I copied and pasted the contents of the files, so I think they are ok. I got decent playback from the contents of the playlist using vlc, so that seems ok, and the sound is pretty reasonable.

Any thoughts on what I have done wrong, or what I can do to fix the problems?

Cheers,  
Dave

---

<div class="post-metadata">

**Author:** ![Feek](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/feek/32/2100_2.png) [@Feek](https://forums.pimoroni.com/u/Feek)\
**Post date:** [March 5, 2017, 9:46am UTC](https://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat/4099/37 "2017-03-05T09:46:54Z")

</div>

The replacement is much better - The buttons work perfectly, thank you.

---

<div class="post-metadata">

**Author:** ![doidgy](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@doidgy](https://forums.pimoroni.com/u/doidgy)\
**Post date:** [March 5, 2017, 12:58pm UTC](https://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat/4099/38 "2017-03-05T12:58:39Z")

</div>

I have exactly the same problem…any help would be appriciated

---

<div class="post-metadata">

**Author:** ![triviadave](https://avatars.discourse-cdn.com/v4/letter/t/71c47a/32.png) [@triviadave](https://forums.pimoroni.com/u/triviadave)\
**Post date:** [March 5, 2017, 10:09pm UTC](https://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat/4099/39 "2017-03-05T22:09:58Z")

</div>

I have played around with the crontab file and done some more digging. It turns out, that for me at least, the problem is not the set-up from the instructions above. It is a crontab problem - a known one at that. I can run the command in [start.sh](http://start.sh) and it seems to work completely as expected, but there seems to be a problem with using @reboot on Raspberry Pis.

I have found a few threads which explain the problem, and give some workarounds, but so far I haven’t managed to get any of them to work, but I think that is probably just me misunderstanding things.

In the short term, ssh-ing into the Pi when it starts up and starting the radio isn’t the end of the world, ultimately I will try to sort it properly, but for now I am happy to keep looking, and enjoying the music while I do.

If I get it sorted, i will update.

---

<div class="post-metadata">

**Author:** ![Feek](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/feek/32/2100_2.png) [@Feek](https://forums.pimoroni.com/u/Feek)\
**Post date:** [March 5, 2017, 10:24pm UTC](https://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat/4099/40 "2017-03-05T22:24:05Z")

</div>

Sorry, I missed this.

I had what may have been a similar issue in that it sometimes seemed to fail to start on boot up. I didn’t check any errors but instead I added a line to ~/vlc/start.sh

Directly before the cd /home/pi/vlc command I simply added `sleep 5`  
and now it works perfectly every time I reboot.

[Previous page](https://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat/4099.md?page=1)

[Next page](https://forums.pimoroni.com/t/pi-zero-w-pirate-radio-and-the-phatbeat/4099.md?page=3)
