[Solved] Lipo Shim and button

I have a raspberry pi zero w and I bought a LipoShim card. I would like to be able to install a push-button start-stop.
Here, we find a diagram to do that. Can I use it with the LipoShim card?
By obviously adapting the GPIO in the code.
Thanx in advance

It should be easy enough to add a power-down button but it wont be able to power the Pi back on again, since LiPo SHIM doesn’t have the facility for the Pi to cut power ( it doesn’t have the latching power switch that OnOff SHIM does ).

See also my answer here: Adding push switch to scrollHD with lipo shim


So, I tried different solutions without result.

I would like a button on / off on a raspberry pi zero W powered by a battery.

I installed an OnOff Shim and installed your script. It worked very well. When I press the button, it starts, and after a while I re-press the button and the clean shutdown procedure works. Very good.

In the second time, I installed your Lipo Shim, and after a clean installation, I installed your second script. In the same way, it works.

Now, I installed the 2 card at the same time, with the 2 scripts, and after a clean shutdown, I can not restart the raspberry pi.

what should I do ?

This is because the LiPo shim is powering the Pi, so the power is never cut by the OnOff SHIM, which uses a latching power circuit.

The only way to get around this is to somehow feed the power from the LiPo shim into the input of the OnOff SHIM instead of directly into the Pi. You could splice a microUSB cable to do this, but that’s a little contrived.

Hi, I’ve found a solution.
If you connect the pin 5 et the pin 6 wtih a push button, the Raspi restart. It works.
If the raspi is running, it doesn’t matter, it continue to work.
If the raspi has been clean stopped, it restart.