Skip to main content

Timers (Continued)


Timers do not have to count down constantly; they can be started and stopped.

Assigning a non-zero value to a timer (i.e., in the Variable Set/Math block) variable always enables the countdown. There is also a somewhat redundant Timer Start block, which does the same job. To pause the timer without resetting its value, use the Timer Stop block.

In this project, pressing the MD button starts the timer. If you keep the button pressed, the timer will count to zero. If you release the button while the timer is still counting, the timer will be stopped, and its current value will be printed to the console.