Hero background

Interactive Story Coding

STEM • 45 • 25 students • Created with AI following Aligned with Common Core State Standards

Download now

Free PDF · we'll email you a copy

STEM
45
25 students
23 May 2026

Teaching Instructions

Create a detailed lesson plan for Lesson 10 of a Year 6 Microbit mini-unit in STEM. Introduce narrative programming. Students create interactive stories with button press choices. Include success criteria, differentiation, resources, lesson structure, assessment.

Overview

Today students begin narrative programming on micro:bit: they will design an interactive “choose-your-own-adventure” story where button presses control what happens next. Students connect story events to simple conditionals, sequencing, and input/output to make an engaging program.

Learning intentions

  • Students will be able to plan a branching story using button-triggered choices.
  • Students will be able to implement interactive logic on the micro:bit using input (buttons) and output (LED display/sound).
  • Students will be able to compute the correct number of steps/branches in a story flowchart and translate it into an algorithm.
  • Students will be able to explain how their program’s structure matches the story they designed.

Success criteria

  • I can describe my story as a sequence of states (scenes) with clear decision points.
  • I can write a program where pressing Button A or Button B in a scene leads to the correct next scene.
  • I can test and debug so each button choice reliably produces the intended output.
  • I can use precise reasoning to explain how many steps/updates happen and why the program behaves that way.

Curriculum links

  • CCSS.MATH.CONTENT.6.NS.A.1: interpret and compute quotients of fractions and solve word problems using visual models and equations—used today in story planning when students convert “time/turn lengths” into fractional representations of display durations (example: “Run the scene for 1/2 second of a 2-second total”).
  • CCSS.MATH.CONTENT.6.NS.C.5: use positive and negative numbers in real-world contexts—used when students model “progress” or “damage” values in the story as positive/negative points tied to choices.
  • CCSS.MATH.CONTENT.6.NS.C.6b: understand reflections across axes—used in a quick mapping activity where students mirror a path when choosing a different route in their story (optional warm-up link).
  • CCSS.MATH.CONTENT.6.NS.C.7c: absolute value as distance from 0—used in “impact” scoring (e.g., absolute value of a score change represents magnitude of effect).
  • CCSS.MATH.CONTENT.6.NS.C.7a: interpret inequalities on a number line—used in ranking endings (e.g., “If score is greater than or equal to 2, you win”).

Lesson structure (45 minutes)

  1. 0–5 min · Hook (Story preview). Teacher demonstrates a tiny branching idea: press A for a happy face and B for a sad face, then ask, “What story logic is happening?” Students turn-and-talk about where the “choice” occurs in code (input) and where the “result” shows (output).
  2. 5–12 min · Direct teach (Narrative programming model). Teacher introduces a simple “scene → choice → next scene” structure and shows how each button press is a decision that changes the program state; briefly model a state variable (like “scene”). Students sketch a 3-scene storyboard with one decision point (Scene 1 then choose A or B).
  3. 12–22 min · Planning with math reasoning (Story flow + scoring). Teacher provides a one-page planner with prompts:
  • “Scene duration” in seconds written as fractions of a total (example: “Show text for 1/2 of the total time”).
  • “Choice impact” using positive/negative points (example: +2 for bravery, -3 for trouble).
  • “Win condition” written as an inequality (example: score ≥ 2). Students complete the planner and compute: one fractional quotient or fraction-of-a-whole display time, then one absolute-value magnitude of impact, then one inequality for a win/lose ending.
  1. 22–35 min · Build (micro:bit interactive story). Teacher models block code (or simple pseudocode) for two scenes with branching:
  • Display text/LED for a scene.
  • On Button A: set scene/state to the next scene and update output.
  • On Button B: set a different next scene and update output. Students implement their full 3–4 scene story in micro:bit (using MakeCode-style blocks or equivalent class tools). They must include at least one Button A branch and one Button B branch, plus test-ready outputs (LED/sound/text).
  1. 35–41 min · Test & debug sprint. Teacher runs a “debug checklist”: verify button mapping, confirm state changes, ensure output matches intended scene. Students run at least two tests per decision and fix one issue if behavior doesn’t match the storyboard.
  2. 41–45 min · Quick share + exit evidence. Teacher prompts: “Which part of your program is your ‘choice’?” Students share in pairs and submit a short exit response: write the rule for Button A in Scene 1 (one sentence) and one computed math statement (e.g., “Absolute value of my impact is __” or “My duration is __ of the total”).

Resources

  • micro:bit devices (1 per student or paired)
  • micro:bit cables and class coding platform (offline or in lab)
  • Printable story planner (3–4 scenes, buttons, scoring prompts)
  • Starter code template with Button A/B hooks and scene/state variable
  • LED/sound reference sheet (what icons/text/sounds are available)
  • Testing checklist card
  • Student notebook or storyboard paper

Assessment

  • Formative: teacher circulates during planning, checking that students have clear scenes and correct button-to-next-scene mapping.
  • Formative: debug checklist results—students demonstrate two successful tests per decision.
  • Exit ticket: (1) verbalized rule for one button choice, (2) one math computation tied to their story plan (fraction quotient or absolute value or inequality).

Differentiation

  • Support for beginners: provide a partially completed planner with labeled Scene 1 outputs and prewritten “Button A leads to Scene 2” sentence starters; give a starter program with the state variable already set up.
  • Support for EAL/SEN: include visuals (scene cards), word bank (scene, choice, button, output, score, win/lose), and allow oral explanations recorded by the student on paper.
  • Extension: require a “third condition” using a second decision point (Scene 2) and include a win/lose condition that uses both an inequality and absolute value to choose between two different endings.
  • Challenge choice: students can add a “progress meter” using symbols (e.g., show 0–5 dots) based on positive/negative score magnitude.

Success criteria recap (for students)

  • My story has scenes and a clear next scene for Button A and Button B.
  • My program matches my storyboard outputs.
  • I tested and debugged at least two button choices.
  • I can explain the choice rule and compute one math-based story detail.

Create Your Own AI Lesson Plan

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.

AI-powered lesson creation
Curriculum-aligned content
Ready in minutes

Created with Kuraplan AI

Generated using openai/gpt-5.4-nano

🌟 Trusted by 1000+ Schools

Join educators across United States