Interactive Lighting with Micro:bit Workshop
The Micro:bit Light Kit
The Micro:bit Light Kit we produced for Lighting The Way contained: a string of LED 'pixels' with crocodile clips; a USB cable, a BBC Micro:bit. and a battery holder. The USB cable will let you power the Micro:bit and LEDs while you program it with your computer. The battery will let you power the Micro:bit and LEDs without being connected to a computer
To power up your Micro:bit plug the big end of the red USB cable into your computer and the small end into the Micro:bit itself. The Micro:bit will switch on and run a demo program (or the last thing you wrote to it). It will also appear as a disc on your computer.
Now connect the LED strip to the Micro:bit. Squeeze the crocodile clips open and clip them to the holes on the Micro:bit. Black goes to GND, red goes to 3V, and yellow goes to 2. The LED string won't go on yet, but you are now ready to start programming!
Programming The BBC Micro:bit
The MakeCode website is full of excellent resources to help you learn about the Micro:bit and how to program it. Perhaps begin by clicking on 'Show Instructions' and 'Start Tutorial'? There are also lots of Micro:bit videos on YouTube.
The Download link in the MakeCode Editor will create a file that can run on your Micro:bit. Drag this onto your Micro:bit disc to run your program. Some web browsers will allow you to connect directly to your Micro:bit to install programs.
Lighting Up The LED Strip
To use the LED strip with MakeCode you need to add the "Neopixel" extension. This will give you a set of new blocks that will control the LEDs. To do this create a new project, click on the "Advanced" menu item, then "Extensions" and then choose the "Neopixel" extension. You will now have the Neopixel blocks in your project.
S set of example programs that make use of the Neopixel extension are given below. These links will open the example, if you then click on the "Edit Code" button you will be able to download it to your BBC Micro:bit or edit it.