Skip to content

Unit of work

Data handling

Computational thinking, Mathematics, Programming | MakeCode | 7-11 yrs

Lesson 4

Data conditions & selection


Pupils explore using data collected by the sensors on the micro:bit as a condition in programs. Then plan, program and test using micro:bit as a temperature warning system.

Learning objectives

  • To know that data can be used as a condition in selection
  • To explore the effects of changing the value of data in programs
  • To write programs that use data as a condition

You will need

Downloadable resources:

  • Lesson plan
  • Lesson slides
  • HEX files
    • street light
    • debugging with sensors
    • street light support
    • temperature sensor support

Other resources:

Printouts of slides, paper - large sheets, MakeCode editor, micro:bits (optional), micro:bit battery packs (optional)

Lesson plan