<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Android sketch works with AXP192, but not 2101]]></title><description><![CDATA[<p dir="auto">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,<br />
Kris ```<br />
code_text</p>
<pre><code>//-----------------------------    power off CTB when USB is powered off -----------------------------------

void checkPWR() {
     battpwr = (M5.Axp.GetBatPower());
    if (battpwr &gt; 100) {                              // Check to see if USB power was removed.
      M5.Axp.PowerOff();                              // Power M5 off
    }
}</code></pre>
]]></description><link>https://community.m5stack.com/topic/7500/android-sketch-works-with-axp192-but-not-2101</link><generator>RSS for Node</generator><lastBuildDate>Tue, 10 Mar 2026 13:28:24 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/7500.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 15 Apr 2025 22:08:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Android sketch works with AXP192, but not 2101 on Wed, 16 Apr 2025 18:54:49 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/183508">@Krmiller</a></p>
<p dir="auto"><code>GetVBusVoltage()</code> exists in M5Core2 library as well. See <a href="https://github.com/m5stack/M5Core2/blob/master/src/AXP.cpp#L358" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/28916</link><guid isPermaLink="true">https://community.m5stack.com/post/28916</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Wed, 16 Apr 2025 18:54:49 GMT</pubDate></item><item><title><![CDATA[Reply to Android sketch works with AXP192, but not 2101 on Wed, 16 Apr 2025 17:18:52 GMT]]></title><description><![CDATA[<p dir="auto">HI <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a></p>
<p dir="auto">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?</p>
<p dir="auto">Thanks,<br />
Kris</p>
]]></description><link>https://community.m5stack.com/post/28915</link><guid isPermaLink="true">https://community.m5stack.com/post/28915</guid><dc:creator><![CDATA[Krmiller]]></dc:creator><pubDate>Wed, 16 Apr 2025 17:18:52 GMT</pubDate></item><item><title><![CDATA[Reply to Android sketch works with AXP192, but not 2101 on Wed, 16 Apr 2025 05:45:22 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/183508">@Krmiller</a></p>
<p dir="auto">have you tried <code>getType()</code> to determine the correct AXP? See <a href="https://github.com/m5stack/M5Unified/blob/master/src/utility/Power_Class.hpp#L165" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>.</p>
<p dir="auto">For AXP2101 you could try <code>getVBUSVoltage</code>. See <a href="https://github.com/m5stack/M5Unified/blob/master/src/utility/Power_Class.hpp#L145" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/28900</link><guid isPermaLink="true">https://community.m5stack.com/post/28900</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Wed, 16 Apr 2025 05:45:22 GMT</pubDate></item></channel></rss>