
STEM • 45 • 25 students • Created with AI following Aligned with Common Core State Standards
Free PDF · we'll email you a copy
This is lesson 3 of 15 in the unit "Micro:bit Innovations". Lesson Title: Conditionals and Logic: Making Smart Decisions Lesson Description: Students explore if/else logic and Boolean conditions to make their Micro:bit programs respond intelligently to different inputs. Using real-world scenarios like traffic lights and vending machines, students connect coding logic to engineering problem-solving. The MakeCode project focuses on a smart light system that reacts to the accelerometer and button inputs. Extension activities challenge advanced learners to nest multiple conditionals for more complex decision trees.
In this third lesson of “Micro:bit Innovations,” students learn how if/else logic and Boolean conditions let a program make smart choices based on inputs (button presses and accelerometer movement). They build a small Micro:bit “smart light” system and connect logical decisions to real-world engineering constraints.
Students will be able to:
Students can:
0–5 min · Hook (Real-world logic). Teacher shows two quick scenarios: “If the button is pressed, a light changes; if not, it stays.” Students do a quick think-pair-share: what actions should happen in each case?
5–12 min · Mini-lesson (if/else + Boolean). Teacher explains: Boolean condition evaluates to true/false; if/else chooses the branch; inputs must be compared to something meaningful (for Micro:bit: button state, accelerometer direction or range). Students complete a 3-question “predict first, run later” worksheet with conditions and expected outputs.
12–22 min · Demo (Smart Light starter). Teacher builds the MakeCode smart light skeleton live:
32–40 min · Rapid test & debug cycle. Teacher instructs a test protocol: choose 2 inputs that should produce different outputs, test, then record results. Students run their programs twice, complete a brief debug log (“Expected / Observed / Fix”).
40–45 min · Exit ticket (Explain logic). Teacher prompts: “Write one sentence for each branch: If ___ is true, then my Micro:bit does ___. If ___ is false, then it does ___.” Students submit on paper or in a digital form.
Join thousands of teachers using Kuraplan AI to create personalized lesson plans that align with Aligned with Common Core State Standards in minutes, not hours.
Created with Kuraplan AI
Generated using openai/gpt-5.4-nano
🌟 Trusted by 1000+ Schools
Join educators across United States