Android sketch works with AXP192, but not 2101
-
I use this code below with AXP192 to determine if the USB power is on/off. I want to power off the core2 when USB pwr is removed. This works with AXP192 but not 2101. What code and libraries would be needed to work with the AXP2101? Also, would be nice if I could determine which AXP this is and use the proper commands. TIA,
Kris ```
code_text//----------------------------- power off CTB when USB is powered off ----------------------------------- void checkPWR() { battpwr = (M5.Axp.GetBatPower()); if (battpwr > 100) { // Check to see if USB power was removed. M5.Axp.PowerOff(); // Power M5 off } } -
-
HI @felmue
Thanks for you reply. After trying to replace the M5core2 library with M5Unified, I see that I'll need to change and retest of number of things. RTC, Buttons, Lcd commands, etc. Is there no other way to address the AXP2101 other than using M5Unified?
Thanks,
Kris -
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