-
Notifications
You must be signed in to change notification settings - Fork 0
Hardware extras
We're using a Pi, no Pi without some hardware integration.
I used pin 8 (TXD) to indicate the status (Pin 9 for ground). See for pin layout: https://pinout.xyz/. For different leds you'll need different resistors. I used this site to calculate it: https://www.ledtuning.nl/nl/resistor-calculator. Note that the Pi outputs 3.3V. My green led required 180 Ω.
By default the Pi doesn't output anything on pin 8. It has to be enabled in /boot/config.txt
:
enable_uart=1
For the on/off switch, pin 5 and 6 can be used. Adding:
dtoverlay=gpio-shutdown
to the config will get it to power on. I used a simple single state switch (goes back to initial state). The rfid-mopidy-go
executable will also monitor pin 5 and will issue the halt
command when triggered.
The startup duration for a Pi is quite lengthy, so I added some sounds to indicate when it's ready. I used some pacman sounds and used aplay
to play them. I added the pacman_sounds
script (in repo) to /etc/init.d
and enabled it via:
sudo chmox +x pacman_sounds
sudo update-rc.d pacman_sounds defaults
(make sure you have some sounds at the location indicated by the script)
The Pi now plays the Pacman startup tune when it finished booting mopidy and plays the Pacman death tune when shutting down.