Will RTC on pijuice keep starting pi even after low charge state is triggered? #969
-
I have a remote project that will operate on battery power and be controlled by the pijuice hat. I have code that will execute when battery charge level indicates the battery is at a low charge state and will shutdown the pi. I'm also using pijuice's RTC to periodically start the pi-0W, take a picture, and then shutdown the pi again. I thought my plans were golden until I realized that even though the battery has reached a low charge state (low enough to trigger the pi shutdown code) with the RTC controlling the next startup, I believe the pi will blissfully start up again, the pijuice would sense low charge on the battery, low charge code executes, pi shuts down and the RTC starts the cycle over again and again until the battery is completely discharged. This is another way of saying, the low charge shutdown code that is assigned to the low battery charge level trigger of the pijuice isn't really doing anything since the RTC is going to keep starting up the pi afterwards. My question: How do I set this up so that once the low charge trigger is reached, the subsequent startup of the pi is blocked or prohibited? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
On low charge trigger a user function. |
Beta Was this translation helpful? Give feedback.
On low charge trigger a user function.
This user function should then disable the RTC wakeup (Reset the RTC programming).
Of course when the Pi starts up again you will have to reinstate the periodic wakeup