<?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[Proper way to handle button (in hour counter)]]></title><description><![CDATA[<p dir="auto">Hey, I am trying to do a hour counter with possibility to reset it to zero when button will be pressed.<br />
An actual flow is:<br />
<img src="/assets/uploads/files/1618923020433-flow-counter.png" alt="0_1618923021623_flow-counter.PNG" class=" img-fluid img-markdown" /></p>
<p dir="auto">Function disp just displaying large numbers 0 to 15.<br />
To speed things up a variable secondsToCount can be decreased to let's say 5.</p>
]]></description><link>https://community.m5stack.com/topic/3206/proper-way-to-handle-button-in-hour-counter</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 11:28:57 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/3206.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 20 Apr 2021 12:51:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Proper way to handle button (in hour counter) on Sat, 24 Apr 2021 00:56:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rosi" aria-label="Profile: rosi">@<bdi>rosi</bdi></a></p>
<p dir="auto">Just add the “Button A wasPressed” callback (located in the Event blockly menu) to your flow and within that block, reset your counter values to the same as in the Setup function.</p>
]]></description><link>https://community.m5stack.com/post/13611</link><guid isPermaLink="true">https://community.m5stack.com/post/13611</guid><dc:creator><![CDATA[world101]]></dc:creator><pubDate>Sat, 24 Apr 2021 00:56:23 GMT</pubDate></item></channel></rss>