100% battery is useless if your device isn't on
-
I really love the M5 Stack. But then you run across things really hard to understand. Like, I dunno, this:
You must set GPIO4 high within 100ms of the device powering on. If your code has delays before setting the pin, the device will shut down.So if you are powering down with 100% battery, it's BY DESIGN.
Your first two lines in setup() must be:
pinMode(4, OUTPUT); digitalWrite(4, HIGH);They are going to protect that battery even if they have to halt your code.
-
@michael-koppelman
Maybe It's a form of watchdog that guards against the device powering on and then pointlessly flattening the battery while doing nothing because there is no code running. It protects the battery against wasted charge-cycles.
Or maybe it's just a 'feature' of the power control circuit. ;-) -
@easytarget Yes, that's exactly what it is. Which is what I disagree with! :)
No other M5 device I'm aware of defaults to turning off. It's a terrible design decision and one that should exclude the Stick from consideration for anything that needs reliable, temporary battery power from the internal battery. You cannot rely on this thing staying on, regardless of how you interact with the "HOLD" pin.
It works fine under any form of external power. The internal battery is useless.
Which is sad because my use case was that when an external power source failed, it would go to the internal battery and software would notice the decline in voltage and alert. If your reboot took 110ms, instead of the normal 90ms (arbitrary, wrong), you are down.
Just my opinion!
M.