<?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[Deep Sleep with MicroPython]]></title><description><![CDATA[<p dir="auto">Hi, I'd like to press the M5 button on my M5StickC-Plus, do something, turn it off/deep sleep and turn it back on with the 'M5' button, as it is easily accessible. Basically I think this is how one of those Dash buttons used to work.</p>
<p dir="auto">I tried with:</p>
<pre><code>axp.setLDO2State(False)
axp.setLDO3State(False)
</code></pre>
<p dir="auto">The screen turns off, but the device seems very much alive (I tried issuing commands from the REPL) and, when unplugged, completely discharges in a short period of time (maybe a few hours?)</p>
<p dir="auto">Is there a way to do this? I saw there may be something for Arduino, not sure if it works reliably, but I'd be willing to port my code to Arduino to have this functionality.</p>
]]></description><link>https://community.m5stack.com/topic/2874/deep-sleep-with-micropython</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 01:47:19 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/2874.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 01 Feb 2021 14:54:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Deep Sleep with MicroPython on Tue, 02 Mar 2021 15:12:19 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/koichirose" aria-label="Profile: koichirose">@<bdi>koichirose</bdi></a></p>
<p dir="auto">here is how I managed to get M5StickC Plus into deep sleep using MicroPython:</p>
<pre><code>p37 = machine.Pin(37, mode = machine.Pin.IN, pull = machine.Pin.PULL_UP)
p37.irq(trigger = machine.Pin.WAKE_LOW, wake = machine.DEEPSLEEP)
machine.deepsleep(20000)
</code></pre>
<p dir="auto">It wakes up from deep sleep either after 20 seconds or when button A is pressed.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/12753</link><guid isPermaLink="true">https://community.m5stack.com/post/12753</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Tue, 02 Mar 2021 15:12:19 GMT</pubDate></item></channel></rss>