Do you know the game Hot Potato?
While music is playing you pass a potato on to your teammates. After the music has been stopped, the player which has the potato loses. You can also play this game with the help of the Calliope mini.
- 2-6 players
- All players sit in a circle.
- A player passes the Calliope mini to another person.
- A player must accept if someone wants to give him the Calliope mini.
- Each player may keep the Calliope mini for as long as he wants.
- When the Calliope mini beeps, the game is over. The player with the Calliope mini in his hand has lost.
Delete your program or start a new one.
Take the block "on button A pressed" from the section "Input":
- Click on "Make a Variable" in the section Variable:
Name your variable: "counter":
You can think of a variable as a box in which you can put your toys - in computer language, this is called saving. The box is given a name so that what you put in it can later be found again. Here this is a random number. The Calliope mini remembers this number and finds it again and again under this name.
Great, you built your first own variable!
Under variable you will now find your new variable:
You need a random number so you don't know when the Calliope mini will start beeping.
- Get "pick random 0 to 4" from Math:
- Get "set item to 0" from Variables:
- Arrange the blocks like this:
- Get "While...do" from Loops:
- Get "0 < 0" from Logic and change it to "0>0":
Greater and lesser have to do with left/right positioning. The verbs ">" (greater than) and "<" (less than) are used to talk about this left/right ordering. The higher number stands on the site where the opening is.
i am smaller < i am larger
- Assemble the blocks like this:
- Get "pause (ms)" from Basics:
- Insert the "pause (ms)"-block like this:
- Build a flashing pattern using the "show leds"-block from basics:
- Get "change item by 1" from variables:
- Drag the block "change item by 1" below "show leds"!
- Change the block "change item by 1" to "change counter by -1".
Great, you taught the Calliope mini how to count down. Now all you have to do is tell the Calliope mini what to do at the end of the game.
- Find these two blocks and put them together:
- Get "0 = 0" from Logic and "counter" from Variables and combine all three:
At the end of the game your Calliope mini should beep. Therefore you can add music!
- Insert any sound from Music!
- Get and insert "set counter to 1":
- Make sure to change it to "set counter to -1".
Great, your hot potato game for the Calliope mini is almost finished! So that your Calliope mini doesn't play tones right at the start, you only have to program one more thing.
Search for these two blocks and put them together:
Now increases the value 5 at the block "pick random 0 to 5", otherwise the Game is over very quickly. Change the 5 to a 30, for example!
Great, you taught the Calliope mini the hot potato game. Try it out with your family, too!
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.