Choose exam board for KS4 Computer Science (GCSE)
Choose exam board for KS4 English
Choose exam board for KS4 French
Choose exam board for KS4 Geography
Choose exam board for KS4 German
Choose exam board for KS4 History
Choose tier for KS4 Maths
Choose exam board for KS4 Music
Choose exam board for KS4 Physical education (GCSE)
Choose exam board for KS4 Religious education (GCSE)
Choose exam board for KS4 Spanish

      Lesson details

      Learning outcome

      I can write programs that use the output and input features of a physical computing device.

      Key learning points

      1. Text and images can be displayed by physical computers using arrays of light such as the micro:bit's LED display matrix.
      2. Sensors can be used to create programs that respond to their environment.

      Keywords

      • Light-Emitting Diode (LED) - a component that emits light when electricity flows through it

      • Hardware component - a physical part of a computer or device that helps perform its function, such as wires, buttons, or an LED display

      • Sensor - a device which detects or measures a physical property such as sound or light

      Common misconception

      The micro:bit can only show letters and numbers.

      The micro:bit's LED display can show more than letters and numbers. It can show shapes, images, and patterns. The display matrix can be programmed to output any desired pattern.

      Teacher tip

      Encourage students to experiment with the micro:bit emulator in MakeCode before downloading code to the micro:bit. This allows them to test their programs and see the results immediately. Programs should be debugged regularly to test changes to programs as they are made.

      Equipment

      Pupils will need access to a device with block-based programming software that can be used to program a physcial controller. Examples in this lesson use Microsoft MakeCode https://oak.link/makecode

      Licence

      This content is © Oak National Academy Limited (2026), licensed on Open Government Licence version 3.0
      except where otherwise stated. See Oak's terms & conditions
      (Collection 2).

      Lesson video

      Loading...

      Prior knowledge starter quiz

      6 Questions

      Q1.
      What is the main function of the LED display on the micro:bit?

      to detect changes in light levels
      Correct answer: to show output, such as numbers, letters, or images
      to capture user input, like button presses
      to measure the temperature of the surroundings

      Q2.
      Which of the following is an input component on the micro:bit?

      LED display
      Correct answer: buttons
      the processor
      speaker

      Q3.
      What is the purpose of the accelerometer on the micro:bit?

      to detect magnetic north
      to measure the temperature
      Correct answer: to sense movement and gestures
      to connect to the internet

      Q4.
      Where do you write programs for the micro:bit?

      directly on the micro:bit
      Correct answer: on a computer using a web-based editor
      You can't write programs for the micro:bit; it comes with pre-loaded programs.

      Q5.
      What is the main purpose of the emulator on the MakeCode editor?

      to download programs to the micro:bit
      Correct answer: to simulate a physical micro:bit and test your code
      to connect the micro:bit to the internet
      to create images and animations for the LED display

      Q6.
      How do you transfer a program from your computer to the micro:bit?

      by emailing the program to the micro:bit
      Correct answer: by connecting the micro:bit to the computer with a USB cable
      by typing the program directly onto the micro:bit using the buttons

      6 Questions

      Q1.
      Which of the following are pre-set icons on the micro:bit's LED display?

      Correct answer: heart
      diamond
      Correct answer: ghost
      Correct answer: skull

      Q2.
      What is the purpose of the 'show leds' block in MakeCode?

      to display a pre-set icon on the LED display
      Correct answer: to turn on specific LEDs on the display to create custom patterns
      to clear the LED display
      to pause the program for a certain amount of time

      Q3.
      What does the pause block do in a micro:bit program?

      It stops the program completely.
      It waits for a button to be pressed.
      Correct answer: It temporarily stops the program for a specified amount of time.
      It clears the LED display.

      Q4.
      Which of the following statements about the micro:bit's LEDs is true?

      The LEDs can only display numbers.
      The LEDs can only be used for output.
      Correct answer: The LEDs can display text, numbers and images.
      Correct answer: The LEDs can be used to detect the amount of light falling on the display.

      Q5.
      What is the purpose of the forever block in MakeCode?

      to repeat a block of code a specific number of times
      Correct answer: to repeat a block of code all the time
      to display a specific image on the LED display
      to pause the program execution for a set time

      Q6.
      What is the approximate duration of a pause set to 100 milliseconds in a micro:bit program?

      one second
      Correct answer: one-tenth of a second
      10 seconds
      one-hundredth of a second

      To help you plan your 7 computing lesson on: Using input and output, download all teaching resources for free and adapt to suit your pupils' needs...