Hero background

MakeCode First Program

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
25 May 2026

Teaching Instructions

This is lesson 2 of 20 in the unit "Microbit Mini-Unit for Year 6". Lesson Title: Getting Started with MakeCode Lesson Description: Guide students to create their first simple program using MakeCode. Focus on using basic blocks and controlling input/output. Success Criteria: Students create a simple program that lights up LEDs. Differentiation: Provide pre-made code snippets for advanced learners to modify.

Overview

Students will build their first MakeCode program using block-based logic to control the micro:bit LEDs. The lesson connects to grade-appropriate number sense by having students describe inputs, outputs, and “positions” of LEDs using signed directions and distances from zero.

Learning intentions

  • Students will create a simple MakeCode program that turns the micro:bit LED display on and off using basic blocks.
  • Students will explain how input triggers output in a program (even if the “input” is just a button press).
  • Students will use integers and absolute value language to describe the display position as a distance from 0.
  • Students will debug by testing changes and revising their program.

Success criteria

  • I can write a MakeCode program that responds to an input (button press) by lighting specific LEDs.
  • I can describe what my program does in plain words using “if/when … then …”.
  • I can explain what 0 means in my situation (center/no distance) and use distance-from-zero reasoning (absolute value).
  • I can make at least one improvement after a test shows the output is not what I expected.

Curriculum links

  • The Number System: use positive and negative numbers together to describe opposite directions/values and explain the meaning of 0 in real contexts.
  • The Number System: interpret absolute value of a rational number as distance from 0 and as magnitude for a positive or negative quantity.
  • The Number System: interpret statements about relative position on a number line (used when students compare “left/right” or “up/down” LED coordinates).

Lesson structure (45 minutes)

  1. 0–5 min · Hook (micro:bit demo). Teacher shows a finished micro:bit MakeCode program lighting LEDs, then asks: “When you press a button, what changes?” Students do a quick think-write: “Input is ___, output is ___.”
  2. 5–12 min · Mini direct teach: blocks and control flow. Teacher walks students through the MakeCode interface (blocks, categories, drag-and-drop) and demonstrates a simple “on button A pressed → show LEDs” flow. Students echo by selecting the same blocks and placing them into a blank program.
  3. 12–20 min · Guided build: first LED program. Teacher provides step-by-step targets (Show LEDs pattern when Button A is pressed; clear LEDs on another action). Students build the program on their devices and run it right away to confirm it works.
  4. 20–28 min · Math connection: describing LED positions. Teacher projects a simple coordinate idea for the LED matrix: “Center row/column is 0; moving up/left is negative; moving down/right is positive.” Teacher models one example: “If an LED is 2 steps above the center, that’s -2 and the distance from center is |-2| = 2.” Students answer two quick prompts on paper or in a notebook:
  • “An LED is 3 steps to the left of center: what is the signed value? what is the absolute value (distance)?”
  • “Which is farther from 0: -1 or 4?”
  1. 28–38 min · Independent practice: pattern challenge + test/debug. Teacher explains the challenge: “Modify your code so Button B lights a different 2–3 LED pattern (or a longer ‘blink’).” Students change at least one block, test, and use a short debug routine: “What I expected → what happened → one change I will try.”
  2. 38–44 min · Share-out (gallery walk with quick language). Teacher has pairs share their input/output description using the sentence frame: “When Button __ is pressed, my micro:bit __.” Students circulate (or rotate seats) and record one useful idea they observe from another group.
  3. 44–45 min · Exit ticket (1-minute check). Teacher collects an exit ticket with two parts:
  • Part A: Write one sentence describing your program’s input and output.
  • Part B: If an LED coordinate is -5, what is the absolute value and what does it mean in words?

Resources

  • micro:bit devices (or simulator if needed)
  • laptops/desktops with MakeCode access
  • printed or on-screen “step cards” for the first LED program
  • LED matrix coordinate reference sheet (center is 0; directions labeled)
  • student notebooks or exit ticket slips
  • teacher demo setup (projector)

Assessment

  • During build time: teacher checks that students placed correct “on button pressed → show/clear” blocks.
  • During position prompts: teacher listens for correct signed direction and correct meaning of absolute value as distance from 0.
  • Exit ticket: verifies input/output explanation and absolute value reasoning.

Differentiation

  • Support: provide sentence starters for debugging (“I expected…, but… I will change…”) and a partially filled MakeCode workspace template for students who need it.
  • Support: include a visual coordinate poster showing negative/positive directions relative to center.
  • Advanced learners: provide pre-made code snippets with multiple LED patterns or a short blink sequence; students modify which pattern appears on Button B.
  • EAL/SEN: allow responses using drawings (e.g., mark -3 on the coordinate diagram and circle the distance) plus optional word banks (“left,” “right,” “distance,” “0 means center”).

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