Four challenges

Four challenges

In this example, you will learn the basics of programming with the Calliope mini with four challenges.

Easy

15 mins

from 8 years on

We will use the MakeCode popup: yes editor in the following challenges.

1Challenge: Getting to know the editor

Turn the face into a heart:

INFO
Everything within the "forever" block is performed by the Calliope mini all the time, i.e. "forever". There are also other blocks that the Calliope mini can use to run programs. You will get to know them later.

Now look for the button "Download" . Click on it. This will save your program on the Calliope mini. The Calliope mini then executes your program permanently.

2Challenge: A message with a heart

The Calliope mini shows you a beating heart all the time. At each heartbeat, the Calliope mini should now also display a text.

Pick the "show string" block from basics and put it into the "forever" loop.

INFO
A program is very easy to write. All you have to do is set the order on the computer: Action 1, Action 2, ...
The computer first makes action 1, then action 2... That means in the technical language sequence. Because of the "forever" block the program starts after the last action again at action 1. This is called an endless loop.

Change the text "Hello" to your own message. For example, you can have the Calliope mini write your own name or the name of a friend.

3Challenge: Start message
###The Calliope mini shows your message at every heartbeat. However, your message will now only be shown at the beginning.
  1. Select the "on start" block from basic.
  1. Take the "show string" block out of the "forever" block and put it into the "on start" block.

INFO
The Calliope mini starts with the "on start" block. Everything inside this block will be done first by the Calliope mini, but not repeated afterwards. The "on start" block is executed only once (at start).

Find the reset button on the Calliope mini and press it. What happens?

Reset means "restart". This means that the Calliope mini starts the program again from the beginning.

4Challenge: A different start
###There are also other ways to start a program. For example, the Calliope mini reacts to the buttons, or when you shake it.
  1. Select the "on button pressed" block from input.
  1. Replace the "on start" block with the "on button pressed" block.

INFO
Now you have learned what input means. You have created a program that reacts when you press the A button. Your program recognizes what you do with the Calliope mini: The program recognizes which button you press.

What do you have to do to make your message appear on the Calliope mini?

Press button A!

Can you get the Calliope mini to display different messages when you press different buttons?

This text as well as the images are published under a CC BY-SA 3.0 DE license popup: yes. It was originally published in German popup: yes by InfoSphere popup: yes and translated into English by the Calliope team.