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. In this lesson, we will experiment with examples of using the micro:bit's General-Purpose Input Output (GPIO) pins to connect it to external hardware components, such as LEDs and speakers.

Licence

This content is made available by Oak National Academy Limited and its partners and licensed under Oak’s terms & conditions (Collection 1), except where otherwise stated.

Loading...

6 Questions

Q1.
What kind of loop was used to iterate through images in the list data structure?
Correct answer: for
honey nut
while
Q2.
Select the line of code that successfully turns off all the LEDs.
Correct answer: display.clear()
display.off()
display.show(00000)
leds.clear(all)
Q3.
In the following line of code, display.set_pixel(x,y,value), what is 'x' referring to?
Brightness of the LED
Correct answer: Column number of the LED
Row number of the LED
Q4.
In the following line of code, display.set_pixel(x,y,value), what is 'y' referring to?
Brightness of the LED
Column number of the LED
Correct answer: Row number of the LED
Q5.
In the following line of code, display.set_pixel(x,y,value), what is 'value' referring to?
Correct answer: Brightness of the LED
Column number of the LED
Row number of the LED
Q6.
If we nest our code in a while True: loop, will it:
Correct answer: Run forever
Run once
Run three times
Run until you say the word False

5 Questions

Q1.
What type of circuit do we need to light up an LED?
Correct answer: Closed
Open
Q2.
What does GPIO stand for?
General Physical Input Output
General Purpose Import Output
Correct answer: General Purpose Input Output
Good Pins Input Output
Q3.
How many GPIO pins are on the micro:bit?
Correct answer: 3
4
5
Q4.
Which connection on the micro:bit is missing in this sequence: 0 1 2 ? GND
3
Correct answer: 3V
5V
Q5.
Which leg of an LED is positive (anode)?
Correct answer: Long
Short