<?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[Core2 should turn off after USB is disconnected]]></title><description><![CDATA[<p dir="auto">Hello,<br />
I got my first Core2 and it's pretty impressive.</p>
<p dir="auto">But I want to turn off the device after the USB port is disconnected.</p>
<p dir="auto">With Core Gray this was possible with <code>M5.Power.setPowerVin(false);</code><br />
How can I handle this with the Core2?</p>
<p dir="auto">Thanks in advance for any help!</p>
]]></description><link>https://community.m5stack.com/topic/4451/core2-should-turn-off-after-usb-is-disconnected</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 22:58:18 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4451.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 21 Jul 2022 17:48:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Core2 should turn off after USB is disconnected on Tue, 30 Aug 2022 10:32:54 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/7940">@Armin_PP</a></p>
<p dir="auto">the function is <a href="https://github.com/m5stack/M5Core2/blob/master/src/AXP192.cpp" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>. Line 390.</p>
<p dir="auto">It returns true if USB is connected and false otherwise.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/18029</link><guid isPermaLink="true">https://community.m5stack.com/post/18029</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Tue, 30 Aug 2022 10:32:54 GMT</pubDate></item><item><title><![CDATA[Reply to Core2 should turn off after USB is disconnected on Fri, 22 Jul 2022 08:36:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a> said in <a href="/post/18023">Core2 should turn off after USB is disconnected</a>:</p>
<blockquote>
<p dir="auto">M5Core2</p>
</blockquote>
<p dir="auto">Good morning Felix,<br />
thank you for your quick reply :-)</p>
<p dir="auto">So I have to disassemble the device and can disconnect the battery I suppose...<br />
That is of course obvious - I didn't think about it, silly me ;-)</p>
<p dir="auto">My goal is - if possible - I would like to do a shutdown few seconds after disconnecting the USB to save all the data on the SD card in time and close the file.<br />
Later, when the USB <strong>voltage is back</strong>, the device should <strong>boot</strong> again <strong>automatically</strong></p>
<p dir="auto">Is this possible?</p>
<hr />
<hr />
<hr />
<hr />
<p dir="auto">May I ask you where to find more information about API or Power management?<br />
Because <code>m5.Axp.isACIN()</code> is not described at [<a href="https://docs.m5stack.com/en/api/core2/axp192_core2" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.m5stack.com/en/api/core2/axp192_core2</a>](link url) and also not in the source code <code>AXP192.cpp</code>. So I can only guess what some functions will do...</p>
<hr />
<hr />
<p dir="auto">Thanks again in advance for your help!</p>
]]></description><link>https://community.m5stack.com/post/18026</link><guid isPermaLink="true">https://community.m5stack.com/post/18026</guid><dc:creator><![CDATA[Armin_PP]]></dc:creator><pubDate>Fri, 22 Jul 2022 08:36:34 GMT</pubDate></item><item><title><![CDATA[Reply to Core2 should turn off after USB is disconnected on Thu, 21 Jul 2022 22:23:57 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/7940">@Armin_PP</a></p>
<p dir="auto">maybe I am missing something here, but wouldn't an M5Core2 without battery installed do exactly that - turn off when USB is disconnected?</p>
<p dir="auto">If that is not what you are looking for, in M5Core2 the AXP192 is responsible for all power related stuff. Calling <code>m5.Axp.isACIN()</code> will tell you whether USB is connected or not.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/18023</link><guid isPermaLink="true">https://community.m5stack.com/post/18023</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Thu, 21 Jul 2022 22:23:57 GMT</pubDate></item></channel></rss>