Hifiberry Amp2 on-off switch

Using GPIO3 as an on/off switch with Amp2 and Volumio looks really hard. Volumio does an i2c-detect-type function at boot and this gets screwed by any of the usual scripts that wait for a trailing edge on GPIO3. I’ve gone for using a DPDT LED momentary on-off switch that listens on a different GPIO for shutdown and shorts GPIO3 for re-start. I’m waiting for the switch to arrive, but it works really well in testing on a breadboard.

Also: I wanted my on-off switch to light up as soon as pi rebooted and go off at shutdown. you can do this by connecting the switch LED to pin 8 (BCM 14 Uart TXD). On the Pi 3B you will need to disable bluetooth in /boot/config.txt to re-direct the UART back to these pins. Add the following line:

dtoverlay=pi3-disable-bt

I believe there is also a way to use miniuart to keep Bluetooth and still do UART on pin 8, but I haven’t tested that yet