KS3 · Computer Science
Sensing with the micro:bit
A micro:bit shows a smiley face for a good movement and a sad face for a bad one. It can't see you. So what is it actually working with?
Computer Science · Sensing movement
Climb the ladder: which rung is it?
Four rungs: data point, sample, class, model. Which rung does each description belong on?
Still to sort
Data point (0)
One acceleration reading on one axis.
Where the line is: Only one number. Add the y and z values and time, and it is no longer just a data point.
Sample (0)
A single set of data: x, y and z values over time.
Where the line is: One set of data from one movement. Group lots of them under a label and you have a class.
Class (0)
A category or label given to samples.
Where the line is: A class is the labelled group of samples. It is not yet the thing that makes predictions.
Model (0)
Uses patterns in data to make predictions.
Where the line is: Labelled samples can be used to train a model. The model is the system that predicts, not the data itself.
A single number is not a movement. Put each description on the right rung, then read why.
Predict, then check
Have a go before the answer shows.
You tilt and shake a micro:bit. What does it actually record?
Smiley or sad face
Reason it through
Why do we label samples as good AND bad, not just good?
First link · your turn
How many patterns of movement does the model need to predict?
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
How a handful of numbers becomes a smiley face.
What you need to know
- A micro:bit can sense movement, and that movement data can be gathered to build a model.
- Movement is measured in three directions: x is side to side, y is forward and backward, z is up and down.
Have a goSam says: 'Up and down is the y value, obviously.' Sam sounds very sure. Which letter is really up and down?
z
Up and down is z. Y is forward and backward, and x is side to side.
- The micro:bit records x, y and z acceleration as numbers. Programmed instructions interpret them; it doesn't understand movement like a person.
- Plot x, y and z against time on a graph and all three are measured together.
- An x value on its own is a single data point: one acceleration reading on one axis, not a sample.
- The combination of x, y and z values over time makes a sample, one set of data used for training or testing.
Have a goYou have one x reading. What would you have to add to it to get a sample?
The y and z values, measured together over time.
A sample is the combination of x, y and z over time. A single x value is just one data point.
- Group lots of samples of a movement under a label, such as good or bad, and you have a class.
Have a goYou have recorded lots of samples of a good tennis shot. What do you do to them to make a class?
Group them together and give them a label.
A class is a category or label given to samples. One sample on its own is only a sample.
- A model uses patterns in data to represent the real world and make predictions. Labelled samples can train one.
- The first step is deciding what data you need, for example tennis shot movements. A data-driven application needs lots of samples.
- Recording rules: hold the micro:bit the same way each time, keep each sample to one second, and record at least three samples of each action.
The big picture
A micro:bit records movement as x, y and z acceleration numbers. One reading is a data point, x, y and z over time make a sample, labelled samples form classes, and classes can train a model that predicts a movement, so the application can respond with an output.
Key points
Worked example
Problem
You record a good tennis shot for one second, holding the micro:bit the same way each time, and repeat until you have 10 good shots. You then do the same for 10 bad shots. Name what you have at each stage, and say how many samples there are.
⚠ Watch out
Thinking one x value describes a whole movement. A single x value is one data point, one acceleration reading on one axis. It takes the x, y and z values over time to make a sample.
Memory hook
Climb the ladder one rung at a time: data point, sample, class, model. Then the application shows its output.
Check yourself
Without looking back: Ava says 'my x reading is my sample'. Explain what is wrong, and say what you would need to turn one x reading into a sample.
Flashcards
(11)What is a micro:bit recording when you tilt or shake it?
Which direction does each of x, y and z measure?
What does the micro:bit's motion graph plot?
Data point
Sample
Class
Model
What is the first step in a data-driven approach?
How many samples does a data-driven application need?
Two rules for recording a sample
Why do we label samples both good and bad?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore KS3 Computer Science topics
How this lesson was checked. This KS3 Computer Sciencelesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 10 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.