Table of Contents

Loops

Repeat multiple times

With this block you can repeat commands multiple times. Place the blocks to be repeated inside the loop. As soon as the program has accomplished the last block in the sequence, it will restart with the first block.

Options:

Example:

This example writes three times Hello! on the matrix.


Repeat while

With this block, you can add a condition to a loop. As long (or until) as the condition is true, the blocks inside the loop will be repeated.

Options:


Count

With this block you repeat a sequence of command blocks, and with each repetition, you change the value of a variable.

Example:

In the first loop, i is 0, then, after each loop it is increased by 1, until it reaches 4. In each loop, we use the value of i to switch on an LED in the matrix, then wait 0.5 seconds.


Break out of loop

This block needs to be placed inside a loop. It can, for instance, be bound to another condition. As soon as the block is reached, the program jumps to the first instruction after the loop.