Lesson 7

Grove - LED (Light Emitting Diode)

LED lights are widely used in general lighting, automotive headlamps, traffic light signals, camera flashes and etc. It offers lower energy consumption, longer lifetime, improved physical robustness, smaller size, and faster switching.

In the Exploration Pack, you are provided with 3 LEDs i.e. Green LED, Purple LED and Red LED.

Task 1

  • Program the micro:bit to turn on the LEDs.
  • When Button A is pressed, the Red LED will turn on.
  • When Button B is pressed, the Purple LED will turn on.
  • When both Button A and B is pressed, the Green LED will turn on.

Task 2

  • Program the micro:bit to turn on the LEDs like 'Christmas' lights.
  • When Button A is pressed, the Red, Purple and Green LEDs will blink in sequence.