Lesson 2: Programming an eCharm

Pupils write a program to initiate a flashing LED panel using the Micro:bit light sensing, as part of their eCharm

Learning objectives

  • To write a program to initiate a flashing LED panel after button press and/or automatically initiate using the Micro: bit light sensing, as part of an eCharm

National curriculum

Pupils should be taught to:



  • Generate, develop, model and communicate their ideas through discussion, annotated sketches, cross-sectional and exploded diagrams, prototypes, pattern pieces and computer-aided design
  • Use research and develop design criteria to inform the design of innovative, functional, appealing products that are fit for purpose, aimed at particular individuals or groups


Technical knowledge

  • Apply their understanding of computing to program, monitor and control their products.

Success criteria

Cross-curricular links

Before the lesson

Download classroom resources

Attention grabber

Main event


Pupils needing extra support: Should be provided with a copy of the Activity: Micro:bit programs or use slides 4-6 as visual aids. Support with verbal prompts. Replay the Teacher and pupil videos for additional visual support.


Pupils working at greater depth: Allow the pupils to explore beyond the prescribed Micro: bit program and extension code. Pause at points through the Micro:bit programming and see if the pupils can suggest what code comes next. Challenge them to the extension tasks to extend their current program to include button B and write a new program to use the Micro:bit light sensing capabilities.

Wrapping up

Assessing pupils' progression and understanding


Created by:
Rebecca Walsh,  
Design & Technology specialist
Rebecca is a passionate Design and technology specialist with seven years of experience delivering and leading the subject. Rebecca has previously taught across all of the D&T curriculum strands, including STEM clubs and extra-curricular activities such as RAF Project X,…
Find out more