Activity 01.02: Ready, setLED(), Code!

Goal: Learn the syntax for the setLED() function.

Success Criteria :

  • The micro:bit runs the program with no errors
  • You turn on at least one LED using the setLED() function

Instruction:

When using setLED(), we need to specify the LED we want to turn on, and if it should be on (True) or off (False).
Here is an example of turning an LED on: m1.setLED(1, 2, True)
Use the image below to help you figure out the position of each LED.
We refer to True and False as Boolean values. Boolean values can only be True or False.

Task:

  • See the example code snippets in the ‘Instruction’ section above.
  • Use the documentation
  • Fill in the blanks below
Scroll to Top