<?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[Newbie question - cycle functions via one button]]></title><description><![CDATA[<p dir="auto">Hi, I'm making a very simple D&amp;D dice program for the M5stick C via UI Flow blockly.</p>
<p dir="auto">I want to be able to use button A to cycle through different dice, as it stands I can only figure out how to do it using wasPressed, DoublePress and longPress.</p>
<p dir="auto">What would be the best way to just use single press to cycle functions?</p>
<p dir="auto">Here is the beginning of my code, i'm sure it's probably not the most efficient way:<br />
<img src="/assets/uploads/files/1597834416708-capture-resized.jpg" alt="0_1597834410475_Capture.JPG" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/topic/2219/newbie-question-cycle-functions-via-one-button</link><generator>RSS for Node</generator><lastBuildDate>Tue, 17 Mar 2026 01:09:43 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/2219.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 19 Aug 2020 10:54:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Newbie question - cycle functions via one button on Wed, 19 Aug 2020 13:48:38 GMT]]></title><description><![CDATA[<p dir="auto">I've figured it out, needed to use lists - this solved it for me <a href="https://www.youtube.com/watch?v=4jDVYZSYTo4" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.youtube.com/watch?v=4jDVYZSYTo4</a></p>
]]></description><link>https://community.m5stack.com/post/9746</link><guid isPermaLink="true">https://community.m5stack.com/post/9746</guid><dc:creator><![CDATA[Lukash616]]></dc:creator><pubDate>Wed, 19 Aug 2020 13:48:38 GMT</pubDate></item><item><title><![CDATA[Reply to Newbie question - cycle functions via one button on Wed, 19 Aug 2020 12:42:44 GMT]]></title><description><![CDATA[<p dir="auto">Right done some more fiddling and it's almost how i want it. The below works but instead of using wasPressed, longPress and wasDoublePress - i want all states to be selectable by wasPressed.</p>
<p dir="auto">Is there a way to do wasPressed Xtimes?</p>
<p dir="auto"><img src="/assets/uploads/files/1597840955412-capture-resized.jpg" alt="0_1597840936064_Capture.JPG" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/9744</link><guid isPermaLink="true">https://community.m5stack.com/post/9744</guid><dc:creator><![CDATA[Lukash616]]></dc:creator><pubDate>Wed, 19 Aug 2020 12:42:44 GMT</pubDate></item><item><title><![CDATA[Reply to Newbie question - cycle functions via one button on Wed, 19 Aug 2020 11:51:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4205">@lukash616</a></p>
<p dir="auto">This maybe could point you in the right direction (subject to improvement ofc.):<br />
<img src="/assets/uploads/files/1597837653247-somedice-resized.png" alt="0_1597837649209_Somedice.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/9743</link><guid isPermaLink="true">https://community.m5stack.com/post/9743</guid><dc:creator><![CDATA[ardo]]></dc:creator><pubDate>Wed, 19 Aug 2020 11:51:56 GMT</pubDate></item></channel></rss>