<?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[How to detect button press with blocking call.]]></title><description><![CDATA[<p dir="auto">While using BLE features the scanning for services method uses a blocking call. During that time a button press is not caught using M5.BtnA.wasPressed(). However the button press needs to be recorded and handled after returning from the blocking call.<br />
Is that possible and how? I am using Arduino in Visual Studio IDE.<br />
Any suggestions are welcome.</p>
]]></description><link>https://community.m5stack.com/topic/1726/how-to-detect-button-press-with-blocking-call</link><generator>RSS for Node</generator><lastBuildDate>Sun, 03 May 2026 18:43:14 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/1726.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 26 Feb 2020 16:37:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to detect button press with blocking call. on Fri, 28 Feb 2020 10:18:54 GMT]]></title><description><![CDATA[<p dir="auto">Thanks lukasmaximus and m5stack. Combining the two answers solved my problem. Split the work over two cores and added a suggested delay between calling M5.BtnA.wasPressed() and it seems to work as hoped for. Did not use the interrupt solution though interesting.</p>
]]></description><link>https://community.m5stack.com/post/7614</link><guid isPermaLink="true">https://community.m5stack.com/post/7614</guid><dc:creator><![CDATA[Kees]]></dc:creator><pubDate>Fri, 28 Feb 2020 10:18:54 GMT</pubDate></item><item><title><![CDATA[Reply to How to detect button press with blocking call. on Thu, 27 Feb 2020 07:57:06 GMT]]></title><description><![CDATA[<p dir="auto">you can through create a thread to solve it.</p>
]]></description><link>https://community.m5stack.com/post/7599</link><guid isPermaLink="true">https://community.m5stack.com/post/7599</guid><dc:creator><![CDATA[m5stack]]></dc:creator><pubDate>Thu, 27 Feb 2020 07:57:06 GMT</pubDate></item><item><title><![CDATA[Reply to How to detect button press with blocking call. on Thu, 27 Feb 2020 04:39:36 GMT]]></title><description><![CDATA[<p dir="auto">It sounds like you may need to set the button to be used as an interrupt, take a look at this guide and see if it helps <a href="https://lastminuteengineers.com/handling-esp32-gpio-interrupts-tutorial/" target="_blank" rel="noopener noreferrer nofollow ugc">https://lastminuteengineers.com/handling-esp32-gpio-interrupts-tutorial/</a> this discussion may also have some related info to help <a href="https://github.com/m5stack/M5Stack/issues/52" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/m5stack/M5Stack/issues/52</a></p>
]]></description><link>https://community.m5stack.com/post/7587</link><guid isPermaLink="true">https://community.m5stack.com/post/7587</guid><dc:creator><![CDATA[lukasmaximus]]></dc:creator><pubDate>Thu, 27 Feb 2020 04:39:36 GMT</pubDate></item></channel></rss>