Main Website LOGIN | REGISTER
< Back to Library

Micro:bit Series 2 – Sensing Data

  • Grade Level: 7-8, 9-12
  • Duration: 60 minutes
  • Subject: Science and Technology
  • Interdisciplinary Connection: Mathematics
  • Platform: micro:bit
  • Skill: Block-based Coding, Computational Thinking, Critical Thinking

Welcome to Micro:bit Sensing Data! In this lesson, you will be introduced to (the) micro:bit's sensors so that you can code, test and modify a data-gathering tool.

What's in this lesson

Curricular Connections Accordion

Login or create an account to view this content

Grade 7:

C3. Coding: solve problems and create computational representations of mathematical situations using coding concepts and skills.

Specific Expectation (s):

C3.1: solve problems and create computational representations of mathematical situations by writing and executing efficient code, including code that involves events influenced by a defined count and/or sub-program and other control structures.

D1. Data Literacy: manage, analyse, and use data to make convincing arguments and informed decisions, in various contexts drawn from real life. Specific Expectation (s): D1.2: collect qualitative data and discrete and continuous quantitative data to answer questions of interest, and organize the sets of data as appropriate, including using percentages.

Secondary Cycle 1: Data Collection- Plans ways of collecting data (e.g., survey, census). Data Analysis: Interprets a data distribution and draws conclusions.

Dimensions of the Digital Competency Framework:

#2: Developing And Mobilizing Technological Skills.

#3: Harnessing The Potential Of Digital Resources For Learning.

#7: Producing Content Via Digital Technology.

Objectives Accordion

Login or create an account to view this content

Learning Goals

Students will be able to...

  • Identify and test the micro:bit sensors
  • Code the micro:bit to become a data-gathering tool
  • Test and modify code to optimize its results

Success Criteria

I can...

  • Identify the different micro:bit sensors and describe what data they collect.
  • Write and execute code using sensor inputs to collect data.
  • Test my data-gathering code and explain how modifications optimize the results

Material Accordion

Login or create an account to view this content

Required Materials

  • Computer
  • Browser (Chrome, Firefox, Safari, Edge)
  • MakeCode website

Optional Materials

  • Micro:bits are required to collect data in the environment, but not essential for online coding.

Lesson Accordion

Login or create an account to view this content
Activity Description
Prior Knowledge

Basic understanding of Block-based Coding structures (sequential events, loops). It would be positive if students have used micro:bits before so that they do not have to be introduced to each function. If students are beginners, see lesson "Introduction to micro:bits" ; Familiarity with input/output devices; Basic knowledge of collecting and representing data (qualitative vs. quantitative).

Minds On

Minds On: 5 minutes

Ask students the following question in an engaging way.

  • What are some sensors that we see in our daily lives?
  • Why are thermometer readings sometimes slow to change (not instantaneous), even by one degree?
  • What kinds of tools help us detect motion of an object? Why do we need to know about the object’s motion?
Model

Introduce Micro:bit Sensors: Review the available sensors on the micro:bit (accelerometer, temperature/light sensor on V2).

Demonstrate finding the correct blocks in MakeCode (e.g., Input/Sensors blocks).

Demonstrate basic data capture and output (15 minutes): Model a simple script using the 'on start' or 'forever' event block that captures data from a sensor (e.g., light level) and displays the reading on the LED screen.

Emphasize the concept of variables (to store the sensor reading) and loops (for continuous monitoring)

Practice

Activity 1: Sensing the Environment (25 minutes): Guide students through creating a script to actively monitor an environmental factor (e.g., temperature, light level, or acceleration data, depending on micro:bit version) using appropriate sensor blocks. Instruct them to assign the output to a variable and display or log the raw numerical data.

Activity 2: Testing and Iterating (15 minutes): Students test their code using the emulator or physical micro:bit (if available) under varying conditions (e.g., covering the light sensor, shaking the micro:bit). Guide students to troubleshoot and modify the sensor sensitivity or output display (e.g., using conditional statements to respond only to significant changes, or refining the display of the data).

Consolidation

Circle Share/Discussion (10 minutes):

Facilitate a discussion where students share their coded data-gathering tool.

Ask:

  • "Which sensor did you choose and why?"
  • "What was the most challenging part of coding the sensor input?"
  • "How did testing help you modify your code to capture the data more accurately?"

Review the three learning goals

Modifications & Accommodations
  1. Visual and Technical Support: Provide a digital glossary or printouts of key sensor blocks and data variables.
  2. Differentiated Challenge: Offer a starter code block that successfully reads one sensor (e.g., temperature) and allow students needing support to focus only on modifying the output (Success Criteria 3).

Assessment Accordion

Login or create an account to view this content

Formative

Teacher Observation and Code Review:

Observe students during the ""Practice"" phase as they write and execute code using sensor inputs. Collect and review the final code (e.g., .hex file or shared link) to evaluate how effectively the student designed the micro:bit as a functioning data-gathering tool.

Extension Accordion

Login or create an account to view this content

Cross Curricular Connections

Science and Technology (Scientific Inquiry): Design an experiment to test the most ideal place in the classroom to grow a plant using light sensors.

Extend Your Thinking

Instruct students to attempt the following ideas with their micro:bits...

Attach speakers to the micro:bit and add sounds to your tool.

Use the conditional blocks to set up precise clauses and communicate more specific results.

Think of different tools to create.