Adding push switch to scrollHD with lipo shim


#1

Hi

I have setup the scrollHD phat and lipo shim on a pi zero and I’d like to add a push button switch to shutdown the pi safely.

From reading about the pins used, I think I could solder wires to pins 37 and 39 for a switch and then adapt the Pimoroni’s clean-shutdown script to use BCM26 for the trigger_pin.

With the lipo shim installed and scroll hat on top, there is a gap between the board header at pins 37 & 39, where I intend on attempting to solder the wires for the push switch. Or solder underneath the Pi Zero.

I haven’t added a switch to a Pi with hats installed, so just want to check this all seems sensible and would appreciate advice on this.

Thanks in advance
Rich


[Solved] Lipo Shim and button
#2

That sounds sensible enough, although you would have to adapt cleanshutdown to monitor both the LiPo SHIMs automatic shutdown pin and your button.

I’m actually working on a python replacement to this script at the moment, which might be easier to modify when it’s finished depending on what you’re more familiar with.

See work in progress here: https://github.com/pimoroni/clean-shutdown/blob/python/daemon/usr/bin/cleanshutd