<?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[paper s3 micropython example for Power.lightSleep()]]></title><description><![CDATA[<p dir="auto">Tried using uiflow to do lightsleep but it just hangs and needs a power restart. Does anyone have a working sample?</p>
]]></description><link>https://community.m5stack.com/topic/8149/paper-s3-micropython-example-for-power-lightsleep</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Apr 2026 19:48:40 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/8149.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 22 Mar 2026 07:06:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to paper s3 micropython example for Power.lightSleep() on Tue, 31 Mar 2026 07:15:39 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/jhfoo2" aria-label="Profile: jhfoo2">@<bdi>jhfoo2</bdi></a></p>
<p dir="auto">well, in my experience and with my M5PaperS3 it takes a couple of readouts (e.g. M5.update()) until the return value from the touch controller goes back to 0.</p>
<p dir="auto">Please let me know if you find a more elegant solution.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/30835</link><guid isPermaLink="true">https://community.m5stack.com/post/30835</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Tue, 31 Mar 2026 07:15:39 GMT</pubDate></item><item><title><![CDATA[Reply to paper s3 micropython example for Power.lightSleep() on Fri, 27 Mar 2026 13:42:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a> thanks that works! But I don't get if the while loop in readAndClearTouch() is necessary? It will be 0 in the 2nd iteration and should exit.</p>
]]></description><link>https://community.m5stack.com/post/30820</link><guid isPermaLink="true">https://community.m5stack.com/post/30820</guid><dc:creator><![CDATA[jhfoo2]]></dc:creator><pubDate>Fri, 27 Mar 2026 13:42:50 GMT</pubDate></item><item><title><![CDATA[Reply to paper s3 micropython example for Power.lightSleep() on Tue, 24 Mar 2026 08:37:55 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/jhfoo2" aria-label="Profile: jhfoo2">@<bdi>jhfoo2</bdi></a></p>
<p dir="auto">well, in my case, without the 1 second delay the UI label wasn't fully updated on the display. Or in other words, ESP32 already went into light sleep while in the background the display was still finishing to update. (In your case it might be ok without the delay as the <code>print()</code> takes some time.)</p>
<p dir="auto">Edit:<br />
<s>I think the reason for not getting the touched X, Y is that internally the wake-up code already read the touch IC registers and by doing so cleared the values. But I could be wrong about that as it is simply a guess.</s></p>
<p dir="auto">I updated my example <em>M5PaperS3_Light_Sleep_Test_UIFlow2.4.3</em> in the UIFlow2 Project Zone to read touch coordinates after wake-up from touch. It's a bit tricky as <code>M5.update()</code> needs to be called repeatedly until the number of touch points drops back to 0.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/30811</link><guid isPermaLink="true">https://community.m5stack.com/post/30811</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Tue, 24 Mar 2026 08:37:55 GMT</pubDate></item><item><title><![CDATA[Reply to paper s3 micropython example for Power.lightSleep() on Mon, 23 Mar 2026 14:57:50 GMT]]></title><description><![CDATA[<p dir="auto">Also: I try to skip uiflow and code directly in micropython. Do you know why I can't get touched X,Y in this code:</p>
<pre><code>    while True:
      StatusLabel.setText('SLEEP')
      time.sleep(1)
      print ('sleep')
      Power.lightSleep(10 * 1000000, True)
      StatusLabel.setText('WAKE')
      time.sleep(1)
      print ('wake')
      time.sleep(1)
      M5.update()
      time.sleep(1)
      (TouchX, TouchY, _, _) = M5.Touch.getTouchPointRaw()
      print (f'{TouchX}, {TouchY}')

</code></pre>
]]></description><link>https://community.m5stack.com/post/30807</link><guid isPermaLink="true">https://community.m5stack.com/post/30807</guid><dc:creator><![CDATA[jhfoo2]]></dc:creator><pubDate>Mon, 23 Mar 2026 14:57:50 GMT</pubDate></item><item><title><![CDATA[Reply to paper s3 micropython example for Power.lightSleep() on Mon, 23 Mar 2026 14:34:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a> said in <a href="/post/30803">paper s3 micropython example for Power.lightSleep()</a>:</p>
<blockquote>
<p dir="auto">M5PaperS3_Light_Sleep_Test_UIFlow2.4.3</p>
</blockquote>
<p dir="auto">Thanks! I see that was able to sleep and loop, and I can add simple code to detect where it was touched that woke it up.</p>
<p dir="auto">Can you help me understand why you put in the 1sec time.sleep()?</p>
]]></description><link>https://community.m5stack.com/post/30806</link><guid isPermaLink="true">https://community.m5stack.com/post/30806</guid><dc:creator><![CDATA[jhfoo2]]></dc:creator><pubDate>Mon, 23 Mar 2026 14:34:37 GMT</pubDate></item><item><title><![CDATA[Reply to paper s3 micropython example for Power.lightSleep() on Mon, 23 Mar 2026 03:13:04 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/jhfoo2" aria-label="Profile: jhfoo2">@<bdi>jhfoo2</bdi></a></p>
<p dir="auto">please have a look at the UIFlow2 Project Zone example I created: <em>M5PaperS3_Light_Sleep_Test_UIFlow2.4.3</em></p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/30803</link><guid isPermaLink="true">https://community.m5stack.com/post/30803</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Mon, 23 Mar 2026 03:13:04 GMT</pubDate></item></channel></rss>