[Solved] Witty Pi 4 L3V7 auto power on and shutdown
I wanted to ask if the following behavior is possible:
When USB power is connected, the raspberry pi turns on.
When USB power is disconnected, it switches to battery. The raspberry pi detects it's on battery and shuts down. Once the pi is off, the power is cut completely (because of USB devices attached to the pi). When USB power is added back, it turns on again.
Would that work with the Witty Pi 4 L3V7?
Yes. This is actually a typical use case of Witty Pi 4 L3V7.
You need to turn on the "Auto-On when USB 5V is connected" option, and it is already ON by default.
You also need to set the low voltage threshold to 4.2V or even a little bit higher, so when USB power is off, it will trigger the shutdown.