icon-background-square
New
New
Year 7

Using input and output

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

icon-background-square
New
New
Year 7

Using input and output

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

warning

These resources will be removed by end of Summer Term 2025.

Switch to our new teaching resources now - designed by teachers and leading subject experts, and tested in classrooms.

Lesson details

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 that can detect things like light, temperature, or movement

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.

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.
speech-bubble
Teacher tip
equipment-required

Equipment

Access to a device that connects to the internet to use the micro:bit MakeCode website. It would also be beneficial for pupils to have access to a micro:bit and a USB cable.

copyright

Licence

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

Lesson video

Loading...

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