<?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[M5.BtnA.wasPressed() conflicts with WiFi?]]></title><description><![CDATA[<p dir="auto">It appears that M5.BtnA.wasPressed() will not work properly if the M5Stack is currently connected via WiFi. I can't find any info on this so I'm posting it here to see if anyone knows anything about this and/or can duplicate what I'm seeing.  (BtnB and BtnC work just fine with WiFi connected...)</p>
<p dir="auto">Is there some sort of resource conflict? It appears that BtnA can not be reliably used if the device is connected via WiFi. The pin appears to become unstable (no pullup/pulldown?) or maybe is being used for some other WiFi related function.</p>
<p dir="auto">Leave code below as is to see unstable BtnA. Comment out just the thyree WiFi connect lines to see BtnA working as expected:</p>
<p dir="auto">----- Code Below ---------------</p>
<p dir="auto">#include &lt;M5Stack.h&gt;<br />
#include &lt;WiFi.h&gt;</p>
<p dir="auto">void setup(){</p>
<pre><code> M5.begin();

 // Comment out the next three lines for Button A to work properly
 WiFi.begin("SSID", "PWD");
 while (WiFi.status() != WL_CONNECTED) {
 }

 M5.Lcd.println("Ready!");
</code></pre>
<p dir="auto">}</p>
<p dir="auto">void loop() {</p>
<pre><code> if(M5.BtnA.wasPressed()) M5.Lcd.println("Button A");

 M5.update();
</code></pre>
<p dir="auto">}</p>
]]></description><link>https://community.m5stack.com/topic/174/m5-btna-waspressed-conflicts-with-wifi</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 08:40:25 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/174.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 17 Apr 2018 18:53:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to M5.BtnA.wasPressed() conflicts with WiFi? on Tue, 17 Jan 2023 20:30:57 GMT]]></title><description><![CDATA[<p dir="auto">The cause is the ESP32 bug.</p>
<p dir="auto">M5Stack Community :<br />
M5.BtnA.wasPressed() conflicts with WiFi<br />
<a href="https://forum.m5stack.com/topic/3262/m5-btna-waspressed-conflicts-with-wifi" target="_blank" rel="noopener noreferrer nofollow ugc">https://forum.m5stack.com/topic/3262/m5-btna-waspressed-conflicts-with-wifi</a></p>
<p dir="auto">This is a report of measures for the A button of M5Stack and the B button of M5Stick C to operate without permission.<br />
ButtonA on M5Stack does not work properly : May 02, 2021</p>
<p dir="auto">void setup(){<br />
WiFi.begin();<br />
WiFi.setSleep(false);<br />
}</p>
<p dir="auto">or</p>
<p dir="auto">#include &lt;driver/adc.h&gt;<br />
void setup(){<br />
adc_power_acquire(); // ADC Power ON</p>
<p dir="auto">:</p>
<p dir="auto">blog :<br />
ButtonA on M5Stack does not work properly : May 02, 2021<br />
<a href="https://macsbug.wordpress.com/2021/05/02/buttona-on-m5stack-does-not-work-properly/" target="_blank" rel="noopener noreferrer nofollow ugc">https://macsbug.wordpress.com/2021/05/02/buttona-on-m5stack-does-not-work-properly/</a></p>
<p dir="auto"><img src="/assets/uploads/files/1673986979664-p.jpg" alt="0_1673987001392_p.jpg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/19892</link><guid isPermaLink="true">https://community.m5stack.com/post/19892</guid><dc:creator><![CDATA[macsbug]]></dc:creator><pubDate>Tue, 17 Jan 2023 20:30:57 GMT</pubDate></item><item><title><![CDATA[Reply to M5.BtnA.wasPressed() conflicts with WiFi? on Tue, 17 Jan 2023 17:16:56 GMT]]></title><description><![CDATA[<p dir="auto">Solved it with adding:</p>
<pre><code>WiFi.setSleep(false);
</code></pre>
]]></description><link>https://community.m5stack.com/post/19885</link><guid isPermaLink="true">https://community.m5stack.com/post/19885</guid><dc:creator><![CDATA[febz11]]></dc:creator><pubDate>Tue, 17 Jan 2023 17:16:56 GMT</pubDate></item><item><title><![CDATA[Reply to M5.BtnA.wasPressed() conflicts with WiFi? on Sun, 28 Nov 2021 12:47:25 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/hague" aria-label="Profile: hague">@<bdi>hague</bdi></a></p>
<p dir="auto">nice find. Thank you for sharing the information.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/15640</link><guid isPermaLink="true">https://community.m5stack.com/post/15640</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sun, 28 Nov 2021 12:47:25 GMT</pubDate></item><item><title><![CDATA[Reply to M5.BtnA.wasPressed() conflicts with WiFi? on Sun, 28 Nov 2021 01:14:24 GMT]]></title><description><![CDATA[<p dir="auto">The problem can be solved with a delay(20); at the end of the loop() function. 10ms was not enough on my system, but 20 does not show any more ghost keystrokes.</p>
]]></description><link>https://community.m5stack.com/post/15638</link><guid isPermaLink="true">https://community.m5stack.com/post/15638</guid><dc:creator><![CDATA[hague]]></dc:creator><pubDate>Sun, 28 Nov 2021 01:14:24 GMT</pubDate></item><item><title><![CDATA[Reply to M5.BtnA.wasPressed() conflicts with WiFi? on Wed, 18 Apr 2018 16:32:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/reaper7" aria-label="Profile: reaper7">@<bdi>reaper7</bdi></a> 在 <a href="/post/856">M5.BtnA.wasPressed() conflicts with WiFi?</a> 中说：</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/calin" aria-label="Profile: Calin">@<bdi>Calin</bdi></a> - this bug is reported as issue? I can't find it...</p>
</blockquote>
<p dir="auto">No... was not reported... i found it few days ago but i didn't report it...<br />
I solved the problem by overwriting the files from Arduino-idf installed on my pc with files from older version.<br />
You can report it to espresiff github repository if you want...<br />
When i will have some time i will investigate exactly what function cause this issue...</p>
]]></description><link>https://community.m5stack.com/post/862</link><guid isPermaLink="true">https://community.m5stack.com/post/862</guid><dc:creator><![CDATA[Calin]]></dc:creator><pubDate>Wed, 18 Apr 2018 16:32:24 GMT</pubDate></item><item><title><![CDATA[Reply to M5.BtnA.wasPressed() conflicts with WiFi? on Wed, 18 Apr 2018 05:16:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/calin" aria-label="Profile: Calin">@<bdi>Calin</bdi></a> - this bug is reported as issue? I can't find it...</p>
]]></description><link>https://community.m5stack.com/post/856</link><guid isPermaLink="true">https://community.m5stack.com/post/856</guid><dc:creator><![CDATA[reaper7]]></dc:creator><pubDate>Wed, 18 Apr 2018 05:16:47 GMT</pubDate></item><item><title><![CDATA[Reply to M5.BtnA.wasPressed() conflicts with WiFi? on Wed, 18 Apr 2018 00:04:34 GMT]]></title><description><![CDATA[<p dir="auto">That is a bug present on the latest Arduino IDF. Install the previous Arduino IDF then will work just fine<br />
Here is an older version that work's just fine: <a href="https://github.com/espressif/arduino-esp32/tree/3a4ec66d41615cbb1c3e830cb6e761cdc4cca9d3" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/espressif/arduino-esp32/tree/3a4ec66d41615cbb1c3e830cb6e761cdc4cca9d3</a></p>
]]></description><link>https://community.m5stack.com/post/855</link><guid isPermaLink="true">https://community.m5stack.com/post/855</guid><dc:creator><![CDATA[Calin]]></dc:creator><pubDate>Wed, 18 Apr 2018 00:04:34 GMT</pubDate></item></channel></rss>