<?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 create an infinite loop with a manual exit]]></title><description><![CDATA[<p dir="auto">I'm using UIFlow v2.4.2 and want to run the flashlight continuously without the current 100 cycle limit. Is there a way to trigger an infinite loop that I can break manually?  Any ideas, examples or suggestions would be great!</p>
<p dir="auto"><img src="/assets/uploads/files/1773133270790-picture1.png" alt="Picture1.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/topic/8127/how-to-create-an-infinite-loop-with-a-manual-exit</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Apr 2026 19:13:40 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/8127.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 10 Mar 2026 09:02:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to create an infinite loop with a manual exit on Tue, 10 Mar 2026 19:35:34 GMT]]></title><description><![CDATA[<p dir="auto">At the end I used switches and it works.</p>
<p dir="auto"><img src="/assets/uploads/files/1773171278412-picture1.png" alt="Picture1.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/30762</link><guid isPermaLink="true">https://community.m5stack.com/post/30762</guid><dc:creator><![CDATA[JohnSal]]></dc:creator><pubDate>Tue, 10 Mar 2026 19:35:34 GMT</pubDate></item><item><title><![CDATA[Reply to How to create an infinite loop with a manual exit on Tue, 10 Mar 2026 12:54:12 GMT]]></title><description><![CDATA[<p dir="auto"><img src="/assets/uploads/files/1773146868817-3abc5f70-e64e-4c30-8088-a4ab96cba4c8-grafik.png" alt="3abc5f70-e64e-4c30-8088-a4ab96cba4c8-grafik.png" class=" img-fluid img-markdown" /><br />
Just as an idea, code not tested:<br />
Avoid to loop somewhere except the main loop!</p>
<p dir="auto">Setup:</p>
<ul>
<li>Create a variable called "Button" to enable/disable the flash function</li>
<li>Create a variable called "Blink" for the current state of the light</li>
<li>Start a timer</li>
</ul>
<p dir="auto">Button clicked:</p>
<ul>
<li>Invert the state of "Button"</li>
</ul>
<p dir="auto">Main Loop:</p>
<ul>
<li>If Button is TRUE, start the timer</li>
<li>else (If it is FALSE) stop the timer</li>
<li>your other code doing somewhat</li>
</ul>
<p dir="auto">Timer0:</p>
<ul>
<li>Blink the LCD (or whatever you want) using the "Blink" variable</li>
</ul>
]]></description><link>https://community.m5stack.com/post/30755</link><guid isPermaLink="true">https://community.m5stack.com/post/30755</guid><dc:creator><![CDATA[holofloh]]></dc:creator><pubDate>Tue, 10 Mar 2026 12:54:12 GMT</pubDate></item><item><title><![CDATA[Reply to How to create an infinite loop with a manual exit on Tue, 10 Mar 2026 09:44:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robski" aria-label="Profile: robski">@<bdi>robski</bdi></a>  can not drag it into the loop, it is outside<br />
<img src="/assets/uploads/files/1773135781867-picture1.png" alt="Picture1.png" class=" img-fluid img-markdown" /></p>
<p dir="auto"><img src="/assets/uploads/files/1773135850607-picture1.png" alt="Picture1.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/30754</link><guid isPermaLink="true">https://community.m5stack.com/post/30754</guid><dc:creator><![CDATA[JohnSal]]></dc:creator><pubDate>Tue, 10 Mar 2026 09:44:15 GMT</pubDate></item><item><title><![CDATA[Reply to How to create an infinite loop with a manual exit on Tue, 10 Mar 2026 09:07:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/johnsal" aria-label="Profile: JohnSal">@<bdi>JohnSal</bdi></a> flashlight code inside function, function in the loop?</p>
]]></description><link>https://community.m5stack.com/post/30753</link><guid isPermaLink="true">https://community.m5stack.com/post/30753</guid><dc:creator><![CDATA[robski]]></dc:creator><pubDate>Tue, 10 Mar 2026 09:07:16 GMT</pubDate></item></channel></rss>