micro:bit Data Logging

This resource is designed to help teachers explore and implement data logging using the BBC micro:bit. It includes direct links to lessons and classroom-ready projects that guide students through collecting, storing, and interpreting data using the micro:bit’s built-in sensors.

What is Data Logging?
Data logging is the process of automatically recording data over time. With the micro:bit, students can gather environmental or physical data—such as temperature, light levels, sound, acceleration, or magnetic fields—either in quick experiments or over longer time periods.

Why Use the micro:bit for Data Logging?
The micro:bit V2’s built-in sensors make it an accessible and powerful tool for real-world data collection. Data is stored directly on the device (even after it’s powered off) and can be viewed in graphs or exported to spreadsheets for deeper analysis. No extra software is required—just plug in and explore data right in a web browser.

Grade Levels: 6 - 12
Subject Matter: Data Science, Physical Computing, Programming, Cross-Curricular Integration: Math, Cross-Curricular Integration: Science, Cross-Curricular Integration: Other
Concepts: Data and Information, Programs and Algorithms, Computing Devices and Systems
Standards: 3-5.DI.2, 6-8.PA.1, 3-5.CD.1
  • Average Rating: 0.0 (0 ratings)

Materials

Lesson Options

Use one of the following lessons to bring data logging to your classroom.

  1. Sound LoggerMake a sound level logger to monitor how loud or quiet different places around you get over time
  2. Traffic Survey data logger – Use your BBC micro:bit as a data-logger to survey things you see, like different kinds of traffic or wildlife, or answers to questions.
  3. Environment data logger – Discover the best places to grow plants by using your BBC micro:bit to study light levels and temperatures over several hours or days.
  4. Movement data logger – Use data logging with your BBC micro:bit V2 to gather accelerometer readings to help design a personalised fitness tracker.
  5. Kick Strength data logger – Use your BBC micro:bit to improve your game by collecting sports science data on the strength of kicks or racket strokes.
  6. Max-min temperature logger – Turn your micro:bit into a self-contained data logger that records maximum and minimum temperature readings, and stores them so it keeps the data even if the batteries run out or you disconnect the power. NOTE: This lesson is an introductory Python program lesson, but you don’t need to understand anything about Python to use it.

Tips for Running the Activity

  • If possible allow students one full day to code and practice data collection, then return for a final data collection test and data analysis. The first day code and practice data collection. Review results and identify places of user error such as: starting the log too early, ending too soon, forgetting to stop the data logging, etc.
  • If errors are noticed on day 1 allow time on day 2 to improve the code. Students can:
    • Collect over a longer period of time by changing the time in the every block to a larger number
    • Add an audible or visual alert if the measurement strength goes over/under a certain value
  • If in a large open area separate students to different designated areas for controlled data collecting
  • If in a small space allow groups to identify a predetermined area and amount of time for data collection
  • Extension opportunities:

Elements of this resource were created by micro:bit, then curated by the team at Nextech.

Learn More