Sid
Published © GPL3+

Multiroom Airplay speaker Using Raspberry Pi Zero W

I got a targus bluetooth speaker on a groupon deal. When I opened it, I found that there was sufficient room for the Raspberry Pi Zero W.

IntermediateFull instructions provided3 hours8,359
Multiroom Airplay speaker Using Raspberry Pi Zero W

Things used in this project

Hardware components

Raspberry Pi Zero Wireless
Raspberry Pi Zero Wireless
×1
Adafruit Speaker bonnet
×1
Speaker: 3W, 4 ohms
Speaker: 3W, 4 ohms
×2
Slide Switch
Slide Switch
×1
Pushbutton switch 12mm
SparkFun Pushbutton switch 12mm
×1

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Schematics

Wiring for adding indicator LED and Power switch

Code

Untitled file

Powershell
Follow the codes in a sequential manner.
#Update and upgrade the OS first
sudo apt-get update
sudo apt-get upgrade

#check dac card number using
aplay -l

#change the config file to set USB DAC a default device. If you are using any Pi #Hats, follow the appropriate steps.
sudo nano /etc/asound.conf

#paste the following and save
pcm.!default  {
 type hw card 1
}
ctl.!default {
 type hw card 1
}

#Add Wifi Credentials and reboot
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
#add the following
network={
ssid="Your_Wifi_SSID"
psk="Your_wifi_password"
}

sudo reboot

#Install Dependencies for Shairport-sync.

sudo apt-get install build-essential

sudo apt-get install git

sudo apt-get install autoconf libtool libdaemon-dev libasound2-dev libpopt-dev libconfig-dev libavahi-client-dev

sudo apt-get install libssl-dev

sudo apt-get install libsoxr-dev

#Build and Install Shairport-sync

git clone https://github.com/mikebrady/shairport-sync.git

cd shairport-sync

#Autoreconf will be a bit slow so do not panic
autoreconf -i -f

./configure --with-alsa --with-avahi --with-ssl=openssl --with-metadata --with-soxr --with-systemd

make

getent group shairport-sync &>/dev/null || sudo groupadd -r shairport-sync >/dev/null

getent passwd shairport-sync &> /dev/null || sudo useradd -r -M -g shairport-sync -s /usr/bin/nologin -G audio shairport-sync >/dev/null

sudo make install

#Autostart Shairport-sync at startup
#Add shairport-sync after exit
sudo nano /etc/rc.local

#Change Name of the Shairport-sync
sudo nano /usr/local/etc/shairport-sync.conf

#Complete installation and reboot
sudo reboot

Mike Brandy's shairport-sync

Mike Brandy's shairport-sync is the heart and soul of the system so, heartfelt thanks to him.

Credits

Sid

Sid

22 projects • 178 followers

Comments