micro:bit Environment Exploration

In this activity, students use the micro:bit as a multi-sensor scientific tool to investigate their surrounding environment. Students will program the device to measure temperature, light levels, and sound levels using built-in sensors, transforming the micro:bit into a thermometer, light meter, and sound meter.

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

Materials

Activity Instructions

  1. Introduce the activity
    • Brainstorm the following questions related to the micro:bit:
      1. What if we could turn a micro:bit into a science tool?
      2. How could we measure things like sound, light, or temperature around us? (without a micro:bit and with a micro:bit)
  2. Introduce micro:bit as  a scientific tool
    • The micro:bit has built-in sensors that can measure the world around it.
    • Explain:
      1. Temperature sensor → measures heat
      2. Light sensor → measures brightness
      3. Microphone → measures sound levels 
    • Optional: watch the BBC provided sensor videos
    • Tell students – They’ll program the micro:bit using code to decide what data to collect and when. 
  3. Program the micro:bit 
    • Create code to using a button to trigger a different sensor reading
    • Model in MakeCode:
      1. Button A → show temperature
      2. Button B → show sound level
      3. Buttons A+B → show light level
  4. Collect Data
    • Pass out the data recording sheet
    • Students can use the BBC data recording sheet for recording your measurements or you can create your own
    • Top tip: gathering as much data as you can is good scientific practice, so you might want to take several readings in each location and calculate an average.
    • Temperature
      1. Use the micro:bit as a thermometer to measure differences in temperature in different places. Press button A to show the temperature in degrees Celsius on the display. It’s a good idea to leave the micro:bit in a new location for a couple of minutes to ensure you get an accurate reading.
    • Sound
      1. To use the micro:bit as sound level meter, press button B to show the sound level on a scale from 0 (quietest) to 255 (loudest).
      2. There’s a short delay before it takes the sound reading to make sure the sound of pressing the button isn’t recorded.
    • Light
      1. To use the micro:bit as a light meter, press buttons A and B together. It shows light level readings, on a scale from 0 (darkest) to 255 (lightest).
  5. Analyze Data
    • Let’s look for patterns in your data.
    • Ask:
      1. Where was the warmest? Coolest?
      2. Where was the loudest? Quietest?
      3. Where was the brightest? Darkest?
  6. Discuss Findings
    • What surprised you?
    • What patterns did you notice?
    • What factors might affect your data?
  7. Debug & Improve -If your readings seemed off, consider:
    • Did you wait for accurate readings?
    • Did background noise affect results?
    • Did location matter?

Tips for Running Activity

  • Add ‘show string’ blocks to make it clearer when temperature, sound and light readings are being displayed.
  • You can modify the code to show temperature readings in Fahrenheit – see the BBC Fahrenheit thermometer project for tips on how to do this (https://microbit.org/projects/make-it-code-it/fahrenheit-thermometer/)
  • If you have the micro:bit V1, which doesn’t have a microphone, you can remove the code for button B and just take temperature and light level measurements.

Reflection / Exit Ticket Questions

  • What data did you collect?
  • What patterns did you find?
  • How did the micro:bit help you investigate?
  • What would you measure next?

Extension Opportunities

Students can:

  • Create graphs of their data
  • Compare indoor vs outdoor environments
  • Convert temperature to Fahrenheit
  • Add labels to display (e.g., “TEMP”)
  • Design a full weather station project

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

Learn More