2.1.28, initiation update to PXT v5.28.24 (#54)
This commit is contained in:
committed by
Peli de Halleux
parent
38a964516e
commit
5c114a0c57
18
docs/calliope/firststeps/Loops.md
Normal file
18
docs/calliope/firststeps/Loops.md
Normal file
@ -0,0 +1,18 @@
|
||||
# FIRST STEPS: LOOPS
|
||||
|
||||
## Introduction @unplugged
|
||||
|
||||
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.
|
||||
|
||||
## Step 1 @fullscreen
|
||||
|
||||
### Infinite loop
|
||||
The simplest way is to use a foverever block, from the basic section.
|
||||
Everything inside will be repeated forever.
|
||||
|
||||
## Step 2 @fullscreen
|
||||
|
||||
Of course, you can also specify how often something should be repeated:
|
||||
|
||||
### Repeat block
|
||||
Use the „on start“ block or any other block that usually initiates a one time cycle. Take the "Repeat 4 times" block from the Loops section and enter the desired number in the number field. Whatever task is within this block will be executed for the number of times you entered within the “Repeat …“ number.
|
Reference in New Issue
Block a user