ERSTE SCHRITTE: DAS 5X5 LED RASTER

Introduction

As in a football match, where the number of goals scored during the match can change, the value of a variable can also change during a running program.

By clicking on the Variables section and then on the “Make a variable…“ button within this section you will generate a new variable. Now you can determine the name.

Step 1

By clicking on the Variables section and then on the “Make a variable…“ button within this section you will generate a new variable. Now you can determine the name.

Step 2

You can find a separate block for each variable, which you can use to display its value on the LED grid of Calliope mini by selecting the “show number 0“ block and use the “set variable to 0“ block from the Variables section and add this on a line before. if you change this number, the number on the grid will change accordingly.

Step 3

Count your score

By combining what you have learned so far, you can program a simple score counter: When button A is pressed, the number of goals variable is increased by one numerical value and then displayed. Have a try!

basic.showLeds(`
    . # . # .
    # # # # #
    # # # # #
    . # # # .
    . . # . .`);