MicroPython LED Control
Sec 1D&TLesson Plan

MicroPython LED Control

Sec 1D&T2 lessonsElectronicsMicroPythonProgramming

Lesson Overview

Students explore basic electronics and introductory coding by programming LED patterns on a MicroPython-compatible microcontroller. This hands-on lesson bridges computational thinking with physical computing, making abstract programming concepts tangible and engaging.

Learning Objectives

By the end of this lesson, students will be able to:

  • 1
    Identify basic electronic components: LEDs, resistors, breadboards, and jumper wires
  • 2
    Connect a simple LED circuit correctly and safely
  • 3
    Write and upload a basic MicroPython script to control LED behaviour
  • 4
    Debug simple syntax and logic errors in code
  • 5
    Explain the relationship between code commands and physical output

Singapore Curriculum Alignment

Aligned to MOE D&T Syllabus (Lower Secondary): Electronics & Control Systems, and the Applied Learning Programme (ALP) framework for Computational Thinking.

Prior Knowledge Required

  • Basic understanding of electricity (current, voltage)
  • Familiarity with digital devices and computing concepts
  • Introduction to block-based coding (e.g. Scratch) is helpful but not required

Materials & Resources

ItemQuantity
BBC micro:bit or ESP32 microcontroller1 per student
USB cable (data-capable)1 per student
Breadboard (half-size)1 per student
LEDs (assorted colours)5 per student
220Ω resistors5 per student
Jumper wires1 set per student
Laptop with Thonny IDE installed1 per student
Printed circuit diagram worksheet1 per student

Safety Notes

  • Always disconnect power before modifying circuits
  • Use correct resistor values to prevent LED burn-out
  • Handle microcontroller USB ports carefully — avoid bending or forcing
  • Do not short-circuit the power rails on the breadboard