Timer Event
- About UI Timer Event
- Reference Manual Entry
The Timer Event is a special event, because its trigger is tied to no specific control element. Its trigger is instead tied to an Action Block (and subsequently the underlying timer_start()
function) named Timer Start Block and Timer Stop Block. Let's call them together the timer.
On Grid you have access to X number of Timer Events, where X equals to the amount of control elements on your module, plus one. So for example a PBF4 has only 12+1=13 Timer Events, while an EN16 has access to 16+1=17 Timer Events.
This is how a timer works: somewhere on an Event there is a Timer Start Action Block, on that Block there is both a Control Element Index and a time given is miliseconds. When that Event triggers, the Timer Start Action runs and Grid will start counting down time. When time runs out, the Timer Event will trigger. Which Timer Event, you ask? It depends on which control element index was input into the initial Timer Start Action Block.
A Timer Event is an excellent tool for creating interaction feedback for example with long press of buttons, or for creating 'resets'. In the case of a 'reset' one could program an encoder with a Timer Start Block or the function and have that trigger the Timer Event after a while, which in turn resets the value of that encoder to 0 with a short bit of code like this: self:encoder_value(0)
.
There is no Reference Manual Entry for this article.