To get started create a new Microbit project.
To access the blocks we need to program the LED strip, you need to add the neopixel extension to your project.
To add an extension follow these steps:
To be able to interact and program the LED strip we will need a variable that stores the strip.
Add the following code to your project. We set the value to be 30 as there are 30 LEDs on the strip.
To make a bicolor flag, we will create 2 ranges of LEDs on the strip and light them up the separate colours of the flag. In this example we're going to make the flag of Malta which is white and red.
Create 2 ranges:
And then light up range1 white and range2 red.
Download the code to your microbit and attached the LED strip using the crocodile clips. It should light up as the flag of Malta.