<?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[Wakeup from Lightsleep using Button A?]]></title><description><![CDATA[<p dir="auto">Hello everyone,<br />
I am can successfully put my StickC to light sleep using a timer, but I would like to be able to wake it up either using the timer (on its own), or by pressing the A button.<br />
This is the code I'm using:</p>
<pre><code>#define BUTTON_PIN_BITMASK 0x2000000000 // 2^37 in hex

  esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR);
  esp_sleep_enable_ext1_wakeup(BUTTON_PIN_BITMASK,ESP_EXT1_WAKEUP_ANY_HIGH); //wake up when Button A is pressed
  Serial.println("Setup ESP32 to sleep for every " + String(TIME_TO_SLEEP) +
  " Seconds");
  esp_light_sleep_start();

</code></pre>
<p dir="auto">This is the guide I used: <a href="https://randomnerdtutorials.com/esp32-external-wake-up-deep-sleep/" target="_blank" rel="noopener noreferrer nofollow ugc">https://randomnerdtutorials.com/esp32-external-wake-up-deep-sleep/</a></p>
<p dir="auto">My guess is that it's got something to do with the PIN 37 being interlanny pulled up or down, but I'm stuck now...<br />
What do you think?</p>
<p dir="auto">Thank you all in advance!</p>
]]></description><link>https://community.m5stack.com/topic/3287/wakeup-from-lightsleep-using-button-a</link><generator>RSS for Node</generator><lastBuildDate>Sat, 02 May 2026 01:41:20 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/3287.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 17 May 2021 17:43:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Wakeup from Lightsleep using Button A? on Fri, 21 May 2021 09:22:58 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/guardian5" aria-label="Profile: guardian5">@<bdi>guardian5</bdi></a></p>
<p dir="auto">you are welcome. I am happy to hear you got it working.</p>
<p dir="auto">Cheers<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/13831</link><guid isPermaLink="true">https://community.m5stack.com/post/13831</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Fri, 21 May 2021 09:22:58 GMT</pubDate></item><item><title><![CDATA[Reply to Wakeup from Lightsleep using Button A? on Mon, 17 May 2021 18:48:09 GMT]]></title><description><![CDATA[<p dir="auto">Thank you Felix, I solved my problem, it was clearly an internal pullup detail:</p>
<pre><code>  esp_sleep_enable_ext0_wakeup(GPIO_NUM_37,0);//Configure GPIO37 as ext0 wake up source for low logic level
  gpio_pullup_en(GPIO_NUM_37);</code></pre>
]]></description><link>https://community.m5stack.com/post/13808</link><guid isPermaLink="true">https://community.m5stack.com/post/13808</guid><dc:creator><![CDATA[guardian5]]></dc:creator><pubDate>Mon, 17 May 2021 18:48:09 GMT</pubDate></item><item><title><![CDATA[Reply to Wakeup from Lightsleep using Button A? on Mon, 17 May 2021 18:34:36 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/guardian5" aria-label="Profile: guardian5">@<bdi>guardian5</bdi></a></p>
<p dir="auto">are you aware that the buttons, when pressed, pull their respective GPIO low (and not high)? Have you tried using <code>ESP_EXT1_WAKEUP_ALL_LOW</code> instead?</p>
<p dir="auto">For reference: <a href="https://docs.m5stack.com/en/core/m5stickc?id=schematic" target="_blank" rel="noopener noreferrer nofollow ugc">M5StickC schematic</a>.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/13807</link><guid isPermaLink="true">https://community.m5stack.com/post/13807</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Mon, 17 May 2021 18:34:36 GMT</pubDate></item></channel></rss>