The Official Raspberry Pi Projects Book - Projects_Book_v4

(singke) #1

Review


raspberrypi.org/magpi The Official Raspberry Pi Projects Book 195


PIRATE RADIO


no need to use a WiFi dongle
plugged into a USB to micro
USB adapter, which makes for
a more streamlined look to the
radio. Even so, such an adapter is
included in the kit, along with an
HDMI adapter. This is presumably
to enable you to hook the Zero W
up to the monitor to install the
software in Raspbian and set
up WiFi, although we went the


instant headless route by adding
ssh and wpa_supplicant.conf
(with our router details) files to
the microSD card before first boot.
On the software side, Pimoroni
has put together guides for three
project examples. The first is for
an internet radio based on the
VLC daemon. As with the other
examples, a single command is
used to install all the required
packages. You can then edit the
playlist file to add URLs for your
favourite radio stations. With
this particular project, everything


can be controlled via the pHAT
BEAT’s five side-mounted buttons:
forward/back to select stations,
pause/play audio, and volume up/
down. The only slight downside
is that the buttons are tiny, and a
little difficult to locate on the side
of the radio at times. The sound
quality is good, however, with
a decent amount of volume. Its
real-time volume level is shown

dynamically by the pHAT BEAT’s
super-bright LED VU meter.
In addition, we followed
Pimoroni’s tutorial to turn the
Pirate Radio into an AirPlay speaker
for streaming audio from an iPhone
and iPad. Both this and the VLC
radio work alongside each other
happily, so you can switch from
one use to the other. Highlighting
the radio’s versatility, Pimoroni
has also put together a Spotify
streaming project using Modipy,
controllable from a remote
computer or device.

Last word


While it’s a slight shame that it doesn’t make use
of the pHAT BEAT’s stereo capabilities, this is an
excellent kit that is easy to assemble and results
in a genuinely useful audio device with good
sound quality. As well as internet radio and music
streaming, potential uses include an Alexa-style
voice assistant (with the addition of a USB mic),
a speaker for musical HATs, and a speaking clock.

magpi.cc/2otO1eJ


£40 / $44


Quality components –


everything you need to build


your own internet radio


pHAT BEAT


Pimoroni’s new Pi Zero-sized audio board packs
twin MAX98357A DAC/amplifiers for stereo output.
While the Pirate Radio uses mono mode, you could
always add an extra speaker. Alternatively, you
can buy the pHAT BEAT separately (£16.50/$18)
and build your own custom stereo radio, or even
repurpose an old ghetto blaster. The pHAT BEAT
also features six push-buttons and two rows of
super-bright APA102 RGB LEDs, for use as a VU
meter or custom-controlled using the board’s
Python library (magpi.cc/2otOwp6).

Left The kit
comes packed
in this neat
reusable case
Free download pdf