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.

8 of 8 still to sort.

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?

Computer Science · Data-driven approach

Put the steps in order

the order you would do them in a data-driven approach

1 · First step5 · Last step
  1. Use the labelled samples to train the model

  2. Decide what data is needed, such as samples of a tennis shot movement

  3. The model makes predictions about new movements

  4. Record lots of samples of the movements

  5. Label the samples to create classes, such as good and bad

Computer Science · Recording samples

One line breaks a recording rule

A pupil plans how to record samples to train a model to tell a good tennis shot from a bad one. Use the recording rules to find the one line that breaks a rule.

A pupil's plan — which line goes wrong?

Smiley or sad face

?

Reason it through

Why do we label samples as good AND bad, not just good?

Link 1 of 4

First link · your turn

How many patterns of movement does the model need to predict?

2
Locked — reveal the link above first
3
Locked — reveal the link above first
4
Locked — reveal the link above first

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

1The micro:bit records numbers (x, y and z acceleration over time), not movement as a person understands it.
2One x value is a single data point. The combination of x, y and z over time is a sample.
3Labelled samples form classes, and classes can be used to train a model that predicts.
4Good and bad labels let the application give a different output for each predicted movement.

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?
Numbers: x, y and z acceleration values, which programmed instructions then interpret.
Which direction does each of x, y and z measure?
x is side to side, y is forward and backward, z is up and down.
What does the micro:bit's motion graph plot?
The x, y and z values against time.
Data point
One acceleration reading on one axis, such as a single x value.
Sample
A single set of data used for training or testing: the combination of x, y and z values over time.
Class
A category or label given to samples. Lots of samples of a movement can be grouped into one.
Model
A system that uses patterns in data to represent something real and make predictions.
What is the first step in a data-driven approach?
Decide what data is needed, such as samples of a tennis shot movement.
How many samples does a data-driven application need?
A large number. To train the model you need at least three samples of each action, and this activity records 10 of each.
Two rules for recording a sample
Hold the micro:bit the same way each time, and keep each sample to one second.
Why do we label samples both good and bad?
There are two patterns to predict, so the application can give one output for each. With only one label you would have good and unknown.

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 posted

More KS3 Computer Science topics

See the full KS3 Computer Science curriculum →

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.

Helpful guides for parents and students