Lesson 1 of 7
What is Physical Computing?
Discover how computers sense and control the physical world through inputs, outputs and microcontrollers.
Learn it
Physical computing means writing code that interacts with the real world through buttons, lights, sensors and motors.
A microcontroller is a tiny computer on a single chip. It reads inputs, runs a program, and controls outputs.
The same Input-Process-Output-Storage ideas you already know still apply — but now the inputs come from sensors and the outputs move real things.
Key terms
- Physical Computing
- Building computer systems that interact with the physical world through sensors and actuators.
- Microcontroller
- A small computer on a single chip that runs one program and controls hardware.
- Sensor
- A device that detects a physical property such as light, temperature or distance and turns it into an electrical signal.
- Actuator
- A device that converts an electrical signal into physical movement, light or sound.
A Day of Physical Computing
Many objects around you already use physical computing. Here is one ordinary morning.
- 1Alarm clock: A microcontroller reads the time, sounds a buzzer and lights up a display.
- 2Toothbrush timer: A small chip vibrates the brush every 30 seconds using a motor driver.
- 3Bus stop display: A microcontroller receives arrival data and updates an LED or e-ink screen.
- 4Crossing lights: A button press is an input; the traffic-light sequence is the output.
A micro:bit Door Monitor (pseudocode)
python# Loop forever
while True:
# Input: read the light level
light = read_light_sensor()
# Process: decide if the door is open
if light > 50:
door_open = True
else:
door_open = False
# Output: show a warning if open
if door_open:
display.show(Image.NO)
play_tone(880, 200)
else:
display.show(Image.YES)
sleep(500)This program reads a light sensor, decides whether a door is open, and gives visual and audio feedback.
Try it
Put the stages of a physical-computing system into the correct order.
- 1The microcontroller processes the sensor value
- 2The microcontroller sends a signal to an actuator
- 3A sensor detects something in the real world
- 4The actuator produces a physical effect such as light or movement
Challenge
A smart thermostat has a temperature sensor, a screen, a heating switch and a small memory chip. Identify one input, one process, one output and one storage action it performs.
Pick whichever way suits you — every mode earns the same bonus XP.
Write at least 40 more characters to submit.
Mark your own work
Guided walkthrough — 0/5 clues revealed
- Clue 1 locked — reveal it only if you get stuck.
- Clue 2 locked — reveal it only if you get stuck.
- Clue 3 locked — reveal it only if you get stuck.
- Clue 4 locked — reveal it only if you get stuck.
- Clue 5 locked — reveal it only if you get stuck.
Each clue costs 3 XP (never below 13 XP). You'd earn 25 XP right now.
Extension: Explain why a simple mechanical thermostat with a bimetallic strip is not an example of physical computing.