Lesson 4
Data conditions & selection
Introduction
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)
Quick links
Lesson plan
Introduction: Comparing Programs and Algorithms (10 minutes)
Tinkering with sensors (20 minutes)
Using temperature sensors (25 minutes)
Debugging with sensors (5 mins)
Extension ideas
Differentiation
Opportunities for assessment
This content is published under a Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) licence.