Hi everybody,
I bought a Zero2Go Omini for use with a Raspi Zero W to create a small interactive music device for my son. The device is equipped with a battery pack and a backup battery to prevent hard shutdowns when the battery pack is empty.
Since this device is cordless, I want to save power and power up the pi only when it is used. So pressing the power button is the way to activate the device and booting up the pi. It should be now stay powered until it is not used for a while. Then it (gracefully) shuts down.
My question is: Is there a way to prevent the hard power-off when pressing the button long? I want to prevent a damaged SD card because my son keeps shutting down the device the hard way by pressing the button long. Otherwise is there a way to *only* wake up the pi by GPIO (i.e. with a separate button)? So pressing the button long/multiple times doesn't matter?
Thanks in advance for your help.
Greetings, Mirko
This behavior is implemented in firmware, and unfortunately there is no configurable option to turn it off.
A possible way is to modify the firmware, and comment out these lines: https://github.com/uugear/Zero2Go-Omini/blob/master/Firmware/Zero2Go-Omini/Zero2Go-Omini.ino#L460-L463
This is how to compile firmware for Witty Pi, but you can use the same way to compile Zero2Go Omini firmware: https://github.com/uugear/Witty-Pi-4#modify-the-firmware
This is how to upload firmware to Witty Pi, but you can use the same way to upload Zero2Go Omini firmware: https://www.uugear.com/doc/WittyPi3_UpdateFirmware.pdf