<?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[M5StickCP2: isCharging inf Power class does not function]]></title><description><![CDATA[<p dir="auto">Hi all,<br />
I'm trying to detect when M5StickC2+ is connected to power. I'm using the function StickCP2.Power.isCharging() to do so. However the function always return value 2 (charge_unknown) no matter if the M5Stick is connected to power or not. Is there an alternate way to detect power connected?<br />
Thanks!</p>
]]></description><link>https://community.m5stack.com/topic/6006/m5stickcp2-ischarging-inf-power-class-does-not-function</link><generator>RSS for Node</generator><lastBuildDate>Sat, 09 May 2026 11:03:08 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/6006.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 21 Jan 2024 22:14:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to M5StickCP2: isCharging inf Power class does not function on Mon, 22 Jan 2024 15:36:20 GMT]]></title><description><![CDATA[<p dir="auto">Thanks <a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a> !</p>
]]></description><link>https://community.m5stack.com/post/23433</link><guid isPermaLink="true">https://community.m5stack.com/post/23433</guid><dc:creator><![CDATA[oody1]]></dc:creator><pubDate>Mon, 22 Jan 2024 15:36:20 GMT</pubDate></item><item><title><![CDATA[Reply to M5StickCP2: isCharging inf Power class does not function on Mon, 22 Jan 2024 11:43:37 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/oody1" aria-label="Profile: oody1">@<bdi>oody1</bdi></a></p>
<p dir="auto">the charger IC (TP4057) in M5StickCPlus2 cannot be queried by software about whether the battery is getting charged or not. It only has two outputs (CHRG and STDBY), but they are not connected. See schematic <a href="http://docs.m5stack.com/en/core/M5StickC%20PLUS2" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>. That is the reason the isCharging() function can only return <em>charge_unknown</em>. See <a href="https://github.com/m5stack/M5Unified/blob/master/src/utility/Power_Class.cpp#L1048" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>.</p>
<p dir="auto">And no, I am not aware of a way to figure out whether M5StickCPlus2 is connected to external power or not.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/23432</link><guid isPermaLink="true">https://community.m5stack.com/post/23432</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Mon, 22 Jan 2024 11:43:37 GMT</pubDate></item></channel></rss>