GoalDescribe input, process and output in a control system, and trace a micro:bit program with a loop.
New words
control system · a system in which inputs are processed to give outputssensor · a part that measures something such as light, heat or movementdata logger · a device that records readings again and againoperating system · the software that looks after the computer and runs the other programs
Explanation
A control system has an input, a process and an output. A sensor gives the input. The program is the process. It compares the input with a rule. The output, such as a motor, a light or a sound, does the job. A data logger takes readings at regular times and stores them. The operating system looks after the computer, and application software, such as a spreadsheet, does a job for the user. Files are different in size. Text files are small, audio files are larger, and videos are usually the largest. A micro:bit is a small control system with buttons, a logo, a shake input and a display of lights.
Part
Greenhouse window
micro:bit shake show
input
a temperature sensor
the board is shaken
process
the program compares the reading with 30
the program runs the repeat block
output
the motor opens the window
the lights flash
Worked examples
A shake show. When the board is shaken, the X shows for 0.5 seconds and goes off for 0.5 seconds, 3 times. A round is 1 second, so the show takes 3 seconds. The X is on for 3 × 0.5 = 1.5 seconds altogether.
Time
Reading
00:00
11 °C
02:00
10 °C
04:00
9 °C
06:00
10 °C
…
…
A data logger takes a reading every 2 hours. In 24 hours it takes 24 ÷ 2 = 12 readings. The readings are stored, and a person can look at them later.
File
Made of
note
words
voice note
sound
photo
a picture
film clip
pictures and sound
Sorting software and files. A spreadsheet program is application software. The operating system is system software. A one-minute film clip is a much bigger file than a short text note.
Class activity
Control it yourself (with family): choose a job in your home that could be done by a control system, such as a night-light that comes on when it is dark. Draw three boxes: input, process, output. Fill them in. What would the sensor be? What would the rule be? Is there any task that a person must still do? Share the plan with a grown-up.
Practice
1
A school gate light comes on when a sensor says it is dark. Name the input, the process and the output.
Input: the light sensor reading. Process: the program checks if it is dark. Output: the light switches on.
2
A data logger takes a reading every 30 minutes. How many readings does it take in 3 hours?
6 readings, because each hour has 2 readings and 2 × 3 = 6.
3
For how long is the diamond on in total, and how long does the show take?
The diamond is on for 4 × 0.5 = 2 seconds in all. The show takes 4 seconds, because each round is 1 second.
4
Write the algorithm: when the logo is touched, show the heart for 2 seconds and then clear the screen.
Step
Instruction
1
?
2
?
3
?
4
?
1. Start program when the logo is touched. 2. Show the heart. 3. Pause for 2 seconds. 4. Clear screen.