Hero background

Step Counter Code

Technology • 60 • 25 students • Created with AI following Aligned with Australian Curriculum (F-10)

Download now

Free PDF · we'll email you a copy

Technology
60
25 students
30 July 2026

Teaching Instructions

Year 5–6 Digital Technologies Lesson Plan Technology: Micro:bit Topic: Introduction to Coding with the Micro:bit – Creating a Digital Step Counter Year Level: Stage 3 (Years 5–6) Duration: 60 minutes Learning Area: Digital Technologies Australian Curriculum Links Students will: Design, create and test digital solutions. Develop algorithms involving sequencing and repetition. Apply computational thinking to solve problems. Collaborate to test and improve digital solutions. Learning Intentions Students will: Understand what a Micro:bit is and how it can be programmed. Create a simple step counter using block coding. Test and debug their program. Reflect on how wearable technologies use similar coding principles. Success Criteria I can: Explain what an algorithm is. Use MakeCode to program a Micro:bit. Test and improve my code. Explain how my program works. Resources One Micro:bit per pair USB cables or battery packs Laptops/iPads Internet access Microsoft MakeCode Projector Prior Knowledge Students know: Basic computer navigation. Simple sequencing. No coding knowledge is assumed. Lesson Sequence Introduction (10 minutes) Teacher displays a smartwatch or fitness tracker. Ask: How does this know when you've taken a step? Does someone press a button every time? What instructions might the computer follow? Introduce: Algorithm Code Debugging Explain that today students will create their own digital step counter. Explicit Teaching (15 minutes) Demonstrate: Open Microsoft MakeCode. Show students: on start forever input → on shake variables show number Explain each block as it is added. Teacher models creating: variable called Steps set Steps to 0 when shaken change Steps by 1 display Steps Discuss why the code works. Guided Practice (10 minutes) Students follow along with teacher. Teacher pauses regularly to: check understanding troubleshoot ask predictive questions Example: "What do you think will happen if we remove this block?" Independent Activity (20 minutes) Students work in pairs. Challenge 1 Create a working step counter. Challenge 2 Modify the program to: display a happy face every 20 steps play a sound after 50 steps reset using Button A Extension Can students predict how fitness watches use similar technology? Reflection (5 minutes) Students complete an exit ticket. Questions: What is an algorithm? What problem did you have to debug? What was one improvement you made? Differentiation Support Pair programming Printed coding guide Pre-labelled screenshots Teacher checkpoints Extension Students create: step goal celebration animation leaderboard challenge calorie estimator using variables Assessment Formative Teacher observations Questioning Coding checkpoints Peer discussions Exit ticket Summative Completed working program demonstrating: variable sequence event testing debugging Cross-Curricular Links Science Wearable technology and sensors. Mathematics Counting, variables and data. Health Physical activity monitoring. English Explaining computational thinking using appropriate vocabulary. Digital Citizenship Discuss: responsible use of devices respectful collaboration taking care of technology Reflection (Teacher) Were students able to: understand sequencing? debug independently? explain their algorithm? What modifications would improve the lesson next time?

Overview

In this lesson, students learn what an algorithm is and how to code a Micro:bit using MakeCode. They will build a digital step counter, test it, and improve it through debugging.

Learning intentions

  • Understand what a Micro:bit is and how it can sense input (like a shake).
  • Create an algorithm for counting “steps” and turning it into code using MakeCode.
  • Test their program, identify issues, and debug to improve it.
  • Explain how wearable technologies use similar sensing and coding ideas.

Success criteria

  • I can explain what an algorithm is (a clear sequence of steps to solve a problem).
  • I can use MakeCode to program a Micro:bit step counter (variable, event, sequence, display).
  • I can test my code and fix errors using debugging strategies.
  • I can explain how my program works using the words: algorithm, event, variable, and sequence.

Curriculum links

  • Digital Technologies: Students design, create and test digital solutions using algorithms and computational thinking.
  • Digital Technologies: Students develop algorithms involving sequencing and repetition.
  • Digital Technologies: Students apply event-based thinking (what the device does when something happens).
  • Digital Technologies: Students collaborate to test and improve digital solutions.

Lesson structure (60 minutes)

  1. 0–5 min · Hook with wearable tech. Teacher displays a smartwatch or fitness tracker, then asks: “How does it know when you’ve taken a step?” Students discuss in pairs and share initial ideas about sensors and instructions.

  2. 5–10 min · Introduce key ideas (algorithm/code/debugging). Teacher writes: Algorithm → Code → Test → Debug on the board, defining: an algorithm is the steps; code is the instructions for the device. Students record a short example of an algorithm they know (e.g., “make a sandwich”) and connect it to counting steps.

  3. 10–22 min · Explicit teaching: MakeCode build (whole class). Teacher projects step counter intro deck and demonstrates opening MakeCode, then adds blocks step-by-step: on start, forever, input → on shake, variable Steps, set Steps to 0, change Steps by 1, show number Steps. Students watch and predict at pauses: “What will happen the first time we shake?”

  4. 22–32 min · Guided practice: “What if…?” checks. Teacher pauses during building and uses questions such as: “What do you think happens if we remove ‘change Steps by 1’?” and “Why do we set Steps to 0?” Students answer using thumbs (or mini-whiteboards) and adjust their understanding after teacher feedback.

  5. 32–52 min · Independent/pair creation: build and test. Teacher distributes devices and pairs begin step counter coding and reflection worksheet. Students program Challenge 1 (working step counter): each shake increments Steps and displays the number; they test by gently shaking the Micro:bit. Teacher circulates for checkpoints: variable name correct, event triggered, display updated.

  6. 52–57 min · Extension within the task (options). Teacher explains the two quick modify tasks:

  • display a happy face every 20 steps
  • play a sound after 50 steps and reset using Button A Students choose one modification, implement it, and do a final test.
  1. 57–60 min · Reflection exit ticket. Teacher directs students to complete an exit ticket on step counter coding and reflection worksheet (or the last section of it). Students answer: “What is an algorithm? What problem did you debug? What improvement did you make?”

Resources

  • step counter intro deck
  • step counter coding and reflection worksheet
  • Micro:bit per pair
  • USB cables or battery packs
  • Laptops/iPads with internet access
  • Microsoft MakeCode (student access)
  • Projector/screen
  • Teacher-made checklist (variable, event, display, testing, debugging)
  • Quiet troubleshooting prompts (e.g., “Did your event block run? Did the variable change?”)

Assessment

  • Formative: teacher observation of pairs during build/testing (event triggers, variable increments, display updates).
  • Formative: questioning during “What if…?” pauses in guided practice.
  • Summative for today (evidence): completed working step counter plus one modification, and exit-ticket responses showing algorithm and debugging understanding.

Differentiation

  • Support: pair programming (roles: coder/tester), printed coding guide on screen, and pre-labelled screenshots within MakeCode classroom supports.
  • Support: sentence starters for explanations: “My algorithm tells the Micro:bit to… When I shake it…”
  • Support: debugging prompts from teacher during circulation (check event block, check variable name/spelling, confirm reset block).
  • Extension: students add a step goal, a celebration animation at the goal, or a simple “rate” idea (e.g., counting shakes within a short time window) if they finish early.

Create Your Own AI Lesson Plan

Join thousands of teachers using Kuraplan AI to create personalized lesson plans that align with Aligned with Australian Curriculum (F-10) 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 Australia