FIRST STEPS: LOOPS

FIRST STEPS: LOOPS

Loops are important to be able to execute program instructions multiple times.

Easy

15 mins

from 8 years on

In this exercise we will use the NEPO editor by Open Roberta. (Make sure you have this image in the upper right corner of your programming environment.) The editor can be found on our website at the top of the navigation bar: Let’s start - Editor.

FIRST STEPS: LOOPS

As you may have noticed in previous exercises, your program was executed only once by Calliope mini. To change this, you can use loops. Use an infinite loop so that the text runs over the LED grid of your Calliope mini infinitely often.

1INFINITE LOOP

To do this, move the Repeat infinitely often block from the Control menu directly under the start block. Everything within this block is now repeated infinitely often.


Of course, you can also specify how often something should be repeated:

2REPEAT BLOCK

Use the Repeat 10 times block from Control and enter the desired number in the number field.