GoalSay what a micro:bit is and tell its inputs from its outputs.
New words
micro:bit · a small computer board that you can programinput · something that tells the board to start, such as a button press or a shakeoutput · what the board does, such as showing lights or playing a sound
Explanation
A micro:bit is a small computer board that you can program. It has 25 lights in a grid, two buttons called A and B, and a sensor that feels when you shake it. Some micro:bits also have a touch logo and a speaker. An input is something that tells the board what to do, such as pressing a button. An output is what the board does, such as showing a picture on the lights or playing a sound. A program makes the board wait for its input. Until the input comes, nothing happens.
Worked examples
A program says: when button A is pressed, show a heart. After you press A, the lights show the heart. Pressing A is the input. The heart on the lights is the output.
Here are some inputs and outputs of a micro:bit.
Program
Input
Output
on button A pressed, show a duck
press A
a duck on the lights
on shake, play a happy sound
shake the board
a happy sound
on button B pressed, show the word Hi
press B
the word Hi on the lights
Every program has an input and an output. Look at three small programs.
Class activity
Be the micro:bit (in pairs): one of you is the micro:bit, the other presses the buttons by tapping their shoulder: left shoulder is A, right shoulder is B. Write three program cards, for example “A: make a heart with your hands”, “B: hum a tune”, “shake: wiggle”. The micro:bit does nothing until a button is tapped, then does only what that card says. Swap roles. What happens if you tap the shoulder that has no card? If you have a computer or tablet, ask a grown-up to open a micro:bit simulator.
Practice
1
Sort into inputs and outputs: pressing button A, showing a smile, shaking the board, playing a sound.
Inputs: pressing button A and shaking the board. Outputs: showing a smile and playing a sound.
2
The lights show this smile after a button is pressed. Is the smile an input or an output?
An output. The lights are what the board does. The button press is the input.
3
A program says: when button A is pressed, show a heart. You press button B. What do you see? Why?