Counter
Last updated
Last updated
The counter counts up or down from zero or a preset number every time the corresponding functions are triggered. A counter can also count into the negative.
To quickly start with counters:
Find the Functions
panel on the left-hand side of the screen.
Expand Utilities
and then Counter.
Create a counter instance with the create
function.
Expand the instance that appeared in the panel and get started with using the timer.
Use the create
and delete
functions to manage the existing timers. Existing timers can be seen in the functions panel on the left under Timer
. Yellow ones are not instantiated and green ones are ready for use.
To create
a counter:
Insert a counter name in the yellow field.
Optionally insert a number for the initial state of the counter. (Only works if the counter is not yet instantiated.)
Click the trigger field to create an instance of the counter. You should see the counter in the functions panel go from yellow to green.
To delete
a counter:
Insert the name of the existing counter you want to delete in the yellow field.
Click the trigger field.
The instance in the functions panel will turn yellow again, until the yellow field of the create
function is cleared, or the create
function is deleted from the board.
To utilize counters, you can find functions tied to each instance when you expand the instance.
Triggering the increment
function increases the counter by 1
.
Triggering the decrement
function decreases the counter by 1
.
With reset
you can set the counter to 0
or a new specified state. The input field has initial greyed out in it, because in the future reset should reset the function to the initial state. As such, please always enter a number for now.
Insert or link a value in the input field.
Trigger the function.
The getCount
function returns the current count of the counter.