Program a micro:bit with blocks in the simulator. Pictures, loops, buttons, variables, sensors, decisions and lists, ending in a pocket pet you build yourself.
★ Challenge completePictures in order, loops that repeat, and code that waits for a button.
Show words and pictures on the micro:bit, and see that blocks run once, from top to bottom.
Put pictures inside forever so they repeat, and use pause to set how long each one stays.
Make the micro:bit wait for a button press or a shake, then react.
A variable that counts, and sensors that give numbers.
Use a variable to remember a number, and change it each time a button is pressed.
Read light, temperature and tilt as numbers, and show them.
If, else and else if: the micro:bit chooses what to do.
Make the micro:bit decide what to do, using a sensor and an if block.
Use one if … else block to choose between two things, so exactly one of them happens.
Add else if to ask more questions in a row, and see that the first true one wins, so their order sets the ranges.
Many values under one name: pick one by its place, or at random.
Keep many values in one list, and pick one by its place, counted from 0.
Pick an item from a list at random, so it works however long the list grows.
Build a pet that gets hungry, eats and does tricks, in three milestones.
Build a pet that lives on your micro:bit, using everything in this course. It gets hungry as time passes, you feed it, and its face shows how it feels.
Progress is saved in this browser only. Nothing is sent anywhere.
For teachers: Teacher guide (notes, answers, solutions, slides and worksheets)