Skipping rope

Skipping rope

Wie häufig kannst du über ein Seil springen?

Easy

30 mins

from 8 years on

In this exercise, we will use the Open Roberta editor. Make sure that you can see this image in the top right-hand corner of your programming environment. You can find the editor on our website at the top of the navigation under: Let's go - Editor.

Now you can run, jump and skip

1Set variables

First, create a variable in which you can save your points. To do this, click on the + symbol in the Start block. Then name the variable Points .

2Start countdown

From the Action menu sub-item, select the Show text block. Now change Text to Characters so that each number is displayed individually and type 321 into the text field.

3Loop

Select the following block in the menu under Control to play your subsequent code in an endless loop.

4Get points

To count how many times you have jumped, use the position sensor. Select the position upright active block from the sensors menu to control the position sensor. Now change upright to shaken. Attach the block to a Wait until block from the expert menu under Control to start the loop only when you shake your mini.

Now add the block increase ... by from the math menu in expert mode and insert the variable points. Now every time the Calliope mini is shaken, a point is added.

To display the score each time the points increase, take the if - make block from the Control menu. Add the = block from the logic menu to this block. Now insert the points variable and a 10 for the maximum number of points and change the equals sign to a greater than sign.

5Done

Now enter what should happen when 10 points are reached. To do this, go to the control menu and select the if - do block. Then insert the = block from the logic menu to define the condition. Now insert the points variable and a 10 for the maximum number of points.

Now you can insert different blocks to really celebrate the winner. Let the LEDs flash, play a hymn or congratulate with words.

6Tempo

To prevent the points from increasing so quickly, you can add a pause at the end of your endless loop. To do this, use the Wait ms block, which you can find under Control. Try out different waiting times until you find a period you like.

Done - download your script now and try it out!

Attach the Calliope mini to your leg or to your wrist.
joint. The program starts: 3, 2, 1... The countdown is counted down and off you go!