Physical Computing: Sensors, Inputs and Outputs
Physical computing means programming computers that sense and act in the real world, such as automatic doors, thermostats and robots.
Input, Process, Output
- Input: buttons and sensors that detect the world
- Process: your program decides what to do
- Output: lights, sounds, motors and screens
The BBC micro:bit
The BBC micro:bit is a small, pocket-sized programmable computer used in many UK schools.
- 25 LEDs in a 5 by 5 grid that can show text, numbers and pictures
- Two buttons, A and B, which are inputs
- Sensors: an accelerometer (detects movement and tilting), a compass, a temperature sensor and a light sensor
- Radio for sending messages between micro:bits
- A speaker on the newest version
You program it with blocks (such as MakeCode) or Python.
Example Programs
on button A pressed
show icon (heart)
on shake
show number (random 1 to 6)
The second program makes a digital dice.
Sensors and Data
- A step counter uses the accelerometer to detect every movement.
- A thermometer displays the temperature reading.
- You can log data over time, such as the temperature in your classroom, then make a graph.
Design, Test and Improve
Plan your device, build and test it, fix bugs, and then improve it. Think about who will use it and how.
Curriculum link: National Curriculum in England: Computing programmes of study (DfE) — Key Stage 2: design, write and debug programs that accomplish specific goals, including controlling or simulating physical systems