M5StickC Plus - detect power button momentary press?
-
I can't find a way to detect a momentary press of the power button on the M5StickCPlus, only button A and button B detection is described. Is there any way to do this in C++?
-
Hello @bazman
according to the schematic the power button only is connected to the AXP192 and not to an ESP32 GPIO as are buttons A and B. Luckily the AXP192 can be setup to detect the power button short / long press via interrupt.
Checkout the AXP192 datasheet - you can find it here. The AXP192 registers dealing with short / long power button press interrupts are 0x42 (IRQ enable 3) and 0x46 (IRQ status 3).
Thanks
Felix
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login