micro:bits & Blocks
CODING CARDS
A dozen cards that need the code completed.
Basic Input/Output:
Basic Display:
Sound:
Logic and Control Flow:
Variables:
Other:
Total Unique Blocks: 20
Breakdown of Blocks Covered
Card | Title | Blocks Used |
1 | Corner to Corner | -on start -show leds |
2 | Blast Off | -on logo pressed -show leds -show string |
3 | Beating Heart | -on start -show icon -repeat loop |
4 | Repeating Fireworks | -on button A pressed -show leds -repeat loop |
5 | Silly Face | -on start -on shake -show leds |
6 | micro:bit to the Rescue | -on button A/B pressed -show icon -pause (ms) -clear screen -play tone for a beat |
7 | Music Match | -on button A+B pressed -play melody -repeat loop -show icon -clear screen |
8 | Y.M.C.A | -on logo pressed -play tone for a beat -set volume -show leds -clear screen |
9 | Shaker Surprise | -on shake -show string -pause (ms) -clear screen -pick random |
10 | Count by Twos | -on start -on button A pressed -show number -variable: count, change count |
11 | Press B for a Smile | -on forever -button B is pressed -if statement -show leds -clear screen |
12 | Scroll My name | -on forever -button A+B is pressed -show string -show leds -if, then, else |
CODING CARDS
to print : pages 5 – 10
solutions : pages 11 – 23
FINISH THE CODE 2
Blast Off
Press the logo button to start a countdown (3, 2, 1) and then make a rocket appear on the screen.
Display a box in the upper right-hand corner of the micro:bit screen. Program the box to move diagonally towards the lower left-hand corner of the screen.
FINISH THE CODE 1
Corner to Corner
FINISH THE CODE 3
Beating Heart!
Can you make a heart pulse 10 times?
FINISH THE CODE 4
Repeating Fireworks
Can you display fireworks bursting on your micro:bit four times?
Display eyes, nose, and a mouth at the start of the code. Then program the micro:bit to stick out its tongue when the micro:bit is shaken.
FINISH THE CODE 5
Silly Face
FINISH THE CODE 6
micro:bit to the Rescue
Oh no, You have been struck with laryngitis! Code your micro:bit as a yes/no answering machine! Press a button A to show a checkmark (yes) and button B to show a X (no). Both symbols should appear for 200 ms. Last, a beep signals you're ready for the next question.
Start program with button A+B. Synchronize the flashing of the diamonds to music. Remember the music should end at the exact time the last diamond displays. Clear icon to finish your program.
Finish the Code 7
Music Match
Finish the Code 8
Y.M.C.A
In 1978, the Village People released "Y.M.C.A." This song became the group’s biggest hit with 12 million copies sold worldwide.
After pressing button A on your micro:bit, you want to count by twos and show the count on the micro:bit.
Hint: You will need to set up a variable to store the number of presses for button A.
Bonus: Count by fives or tens.
FINISH THE CODE 10
Count by Twos
FINISH THE CODE 9
Shaker Surprise
Code your micro:bit to pick a random number from 1 to 9 whenever you give it a shake. The number should appear for two seconds and then disappear.
Can you make the screen display a question mark on your micro:bit until you press Button A+B? Then program your name to scroll across the screen.
FINISH THE CODE 12
Scroll My Name
After pressing button B, can you show a happy face and then clear the screen immediately.
FINISH THE CODE 11
Press B for a Smile
Possible Solutions
Finish the Code Solution 1
Corner to Corner
Finish the Code Solution 2
Blast Off
Finish the Code Solution 3
Beating Heart!
Finish the Code Solution 4
Repeating
Fireworks
Finish the Code Solution 5
Silly Face
Finish the Code Solution 6
micro:bit to the Rescue
Finish the Code Solution 7
Music Match
Finish the Code
Solution 8
Y.M.C.A. Music
Finish the Code Solution 9
Shaker Surprise
Finish the Code Solution 10
Count by Twos
Finish the Code Solution 11
Press B for a Smile
Finish the Code Solution 12
Scroll My Name