BBC micro:bit
Bit:Commander - The Neopixels

Introduction

The Bit:Commander has 6 Neopixels. They are at the top of the board and handily labelled 0 to 5. The Neopixels are connected to pin 13 on the micro:bit. The Neopixels on the Bit:Commander don't need any special treatment, although you may need to write a low signal to the buzzer to avoid noise. They work with all of your standard Neopixel code. Be warned that these LEDs are bright. That's great when you are using the board from distance as a lighting effect. If you also want to be able to see the buttons when you press them, you will need to tone down the brightness a lot.

micro:bit circuit

Programming

This program cycles through the button colours at quite a low brightness setting.

micro:bit circuit

JavaScript

let pixels: neopixel.Strip = null
pixels = neopixel.create(DigitalPin.P13, 6, NeoPixelMode.RGB)
pixels.setBrightness(32)
pins.digitalWritePin(DigitalPin.P0, 0)
basic.forever(() => {
    pixels.showColor(neopixel.colors(NeoPixelColors.Red))
    basic.pause(1000)
    pixels.showColor(neopixel.colors(NeoPixelColors.Blue))
    basic.pause(1000)
    pixels.showColor(neopixel.colors(NeoPixelColors.Green))
    basic.pause(1000)
    pixels.showColor(neopixel.colors(NeoPixelColors.Yellow))
    basic.pause(1000)
})

Next Steps

The Neopixel library has a lot of blocks that are worth experimenting with. With a bit of experimentation, you can achieve all sorts of stunning effects. You can also control the lights invidually and use them as indicators.