AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Inputs and outputs

Week 19 · Unit 8: Be an innovator · 3 lessons
1

What goes into the board

Computing 4: Unit 8, pp. 104–122
GoalName the input devices of a micro:bit and say what each one detects.
New words
input device · a part that sends data to the boardsensor · an input device that measures something, such as light, heat, sound or movementaccelerometer · a sensor that detects movement, tilting and shakingcompass · a sensor that detects the Earth’s magnetic field, so it can find north
Explanation

A micro:bit is a small computer, and like every computer it has input devices. An input device sends data to the board. The two buttons A and B are inputs, and so is the gold logo, which can sense a touch. The board also has sensors. The light sensor measures how bright it is, and the temperature sensor measures how warm it is. The microphone measures how loud a sound is. The accelerometer detects shaking, tilting and falling. The compass finds north. The radio can receive messages sent by another micro:bit. Before we write a program, we decide which inputs we need.

temperature sensorlight sensorsound levelcompassradio receiver
Worked examples
Input deviceWhat it detectsA use for it
button A or Ba pressstart a program
touch logoa touchwake up a pet
light sensorhow bright it isa night light
temperature sensorhow warm it isa room thermometer
accelerometermovement and shakinga step counter
microphonehow loud a sound isa clap meter
compassthe direction of northa direction finder
Each input device detects one kind of thing.
GadgetInput device it needs
step counteraccelerometer
plant monitor for darknesslight sensor
clap-switchmicrophone
compass arrowcompass
Choose the input that fits the gadget. A step counter must notice every step, so it uses the accelerometer. A plant monitor that tells you when the room is too dark uses the light sensor. A clap-switch uses the microphone.
board 1board 21
The radio is an input and also an output. A micro:bit can receive a message from another micro:bit, and it can send one. Here two boards talk to each other without a wire. Never open a board or touch its pins without a grown-up.
Class activity

Sensor hunt (with family): walk around home or school and find six things that use a sensor, such as an automatic door, a lamp that turns on when it is dark, a thermostat or a phone that turns its screen when you tilt it. For each one, write down the input that it detects. Which sensors do you think are inside the thing? Do not open any device and never touch plugs or sockets.

Practice
1
Which input device does each gadget need? A starts when it is shaken, B tells you how bright the room is, C counts claps, D shows where north is.
GadgetInput device
A starts when shaken?
B room brightness?
C counts claps?
D shows north?
2
What does the accelerometer detect?
3
Which of these is an input: the LED display, button B or the speaker?
4
Which two of these school computer parts are input devices? Then name two input devices of the micro:bit.
keyboardprintermousemonitorspeaker