Control
Setup
Everything in the setup block will run once when the program starts. The setup block runs before the forever block.
Behind the scenes, the setup block defines the setup()
function.
Forever
Everything in the forever block will run forever. This is an infinite loop.
Behind the scenes, the forever block defines the loop()
function.
Delay (seconds)
This delay block makes your program wait for a certain number of seconds before continuing.
Delay (milliseconds)
This delay block makes your program wait for a certain number of milliseconds before continuing.
About milliseconds
A millisecond is one thousandth (1/1000) of a second.
- 1 second = 1000 milliseconds
- 1 millisecond = 0.001 seconds
"ms" is short for "milliseconds".
Delay (microseconds)
This delay block makes your program wait for a certain number of microseconds before continuing.
About microseconds
A microsecond is one millionth (1/1000000) of a second.
- 1 second = 1,000,000 microseconds
- 1 microsecond = 0.000001 seconds
"μs" is short for "microseconds".
Run time (milliseconds)
This run time block gives tells you how long your program has been running for in milliseconds.
Run time (microseconds)
This run time block gives tells you how long your program has been running for in microseconds.
Wait forever
The wait forever block stops your program completely. It won't do anything after this block.