Things used in this project

Hardware components:
Raspberry pi zero
Raspberry Pi Zero
×1
pHAT DAC
×1
Adafruit Mono 2.5W Class D Amplifier
×1
Adafruit industries ada1314 image
Speaker: 3W, 4 ohms
×1
Wifi USB dongle
×1
USB OTG cable
×1
Hand tools and fabrication machines:
09507 01
Soldering iron (generic)
3drag
3D Printer (generic)

Schematics

pHAT DAC
Screen shot 2016 01 20 at 22.36.19

Code

Code snippet #1Plain text
sudo diskutil list
sudo diskutil unmountDisk /dev/disk3
sudo dd if=Downloads/2015-11-21-raspbian-jessie.img of=/dev/disk3 bs=1m
sudo diskutil unmountDisk /dev/disk3
Code snippet #2Plain text
sudo apt-get update
sudo apt-get upgrade
Code snippet #3Plain text
pi@raspberrypi:~ $ sudo nano /boot/config.txt

# pHAT DAC
dtoverlay=hifiberry-dac
Code snippet #4Plain text
pi@raspberrypi:~ $ aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC HiFi pcm5102a-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
Code snippet #5Plain text
pi@raspberrypi:~ $ sudo nano /etc/asound.conf

pcm.!default {
  type hw
  card 1
}

ctl.!default {
  type hw
  card 1
}
Code snippet #6Plain text
pi@raspberrypi:~ $ sudo apt-get install git libao-dev libssl-dev libcrypt-openssl-rsa-perl libio-socket-inet6-perl libwww-perl avahi-utils libmodule-build-perl
Code snippet #7Plain text
pi@raspberrypi:~ $ git clone https://github.com/njh/perl-net-sdp.git perl-net-sdp
pi@raspberrypi:~ $ cd perl-net-sdp/
pi@raspberrypi:~/perl-net-sdp $ perl Build.PL
pi@raspberrypi:~/perl-net-sdp $ sudo ./Build
pi@raspberrypi:~/perl-net-sdp $ sudo ./Build test
pi@raspberrypi:~/perl-net-sdp $ sudo ./Build install
Code snippet #8Plain text
pi@raspberrypi:~ $ git clone https://github.com/hendrikw82/shairport.git
pi@raspberrypi:~ $ cd shairport/
pi@raspberrypi:~/shairport $ make
Code snippet #9Plain text
pi@raspberrypi:~/shairport $ ./shairport.pl -a AirPi
Code snippet #10Plain text
pi@raspberrypi:~/shairport $ sudo make install
pi@raspberrypi:~/shairport $ sudo cp shairport.init.sample /etc/init.d/shairport
pi@raspberrypi:~/shairport $ sudo chmod +x /etc/init.d/shairport
pi@raspberrypi:~/shairport $ sudo update-rc.d shairport defaults
Code snippet #11Plain text
pi@raspberrypi:~/shairport $ sudo nano /etc/init.d/shairport

#DAEMON_ARGS="-w $PIDFILE"
DAEMON_ARGS="-w $PIDFILE -a AirPi"

Credits

Logo wit darkbg
Frederick Vandenbosch
8 projects • 61 followers
Building electronic things
Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Sign up / LoginProjectsPlatformsTopicsContestsLiveAppsBetaBlog