M5Stick C Plus - Using button A to wakeup the device?
-
I am using the M5Stick C Plus to send a MQTT command. Currently I have it programmed to send the command and then power off. If I understand correctly it is actually going into deep sleep mode.
If I use the power button on the side it wakes up and sends the MQTT command. This gives me great battery life.
Is it possible to use button A to perform this task as it is much easier to press than the little buttons on the side?
I could not find a "power on" in UiFlow.
My other option is to 3d print a simple sleeve that would make the side button larger / easier to press.
Thanks!
- Paul
-
Hello @LBP-of-MO
when you use the
power off
block everything (including ESP32) gets powered off. From that state the device can only be powered on again via the little button (power button) on the side (or when USB is plugged in). In other words, no, button A cannot be used to power on the device.Thanks
FelixP.S. Deep sleep is a low power mode of the ESP32 and requires the ESP32 to stay powered on. However deep sleep is not available via UIFlow blocks afaik. Also please note: an M5StickCPlus with its ESP32 in deep sleep mode consumes a lot more energy than when it is fully powered off.
-
I tried calling machine.deepsleep(xxx) in UIFlow and all it did was lock up the device, so tightly that even the power/reset button did not work. It might work from other IDEs , if you could succeed in setting up all the interrupts before putting it to sleep.
-
We 3D printed a sleeve that makes the M5 both wearable as a lanyard and allows the power button to be easily pressed.
Our customers use the M5 to send a MQTT command that briefly changes the content on a TV from cable/satellite programing to their own internal marketing images and videos.
Our issue was that running the command and then putting the device in deep sleep with the A button had a battery of just a few hours.
Using the power button worked but it is hard to push especially when worn around the neck.
This sleeve has solved the "mechanical" issue with trying to actually use the power button.
We are getting several days of battery life which is more than perfect.
- Paul Wheeler
Local Business Patriots
- Paul Wheeler