04 - Neopixel

This tool is all about lights, LED lights that we can control using the micro:bit. The LED lights we are using are called NeoPixels.
Neopixels are smart individual colour-changing LEDs and are usually chained together in different shapes and lengths, such as rings, strips, and matrixes. Each light is controlled by an integrated circuit that sets the colour and passes the rest of the instructions to the next light.
Each neopixel has a red, green and blue light and they can change their intensity (brightness), ranging from 0, no brightness at all to 255, full brightness. This range from 0 to 255 with three lights can reproduce 16.7 million different colours.

These are the different parts of the neopixel in the diagram above:
VDD. This is where the cable with electricity connects to the neopixel.
VSS. This connects the neopixel to the ground line.
DIN. The information travelLing from the micro:bit enters the neopixel via this connector.
DOUT. Once the neopixel has interpreted the signal and given the corresponding instructions to the red, green and blue LEDs, the remaining set of instructions goes out to the next neopixel via this connector.
π΄. Red LED.
π’. Green LED.
π΅. Blue LED.
Integrated Circuit. This is represented by the gray rectangle in the image above. The integrated circuit is the brain of the neopixel and it is in charge of:
Receiving information from the micro:bit or the previous neopixel.
Telling each LED how bright it should be.
Passing the remaining commands to the next neopixel.
Connecting a Neopixel to the micro:bit
Neopixels usually have three cables, Signal, Ground and Power.
The Signal wire carries the information from our micro:bit to the neopixel, instructing what colour to display.
The Ground(GND) wire provides a way for excess electricity to flow safely. The Ground wire only acts when there is a problem with the electrical system.
The Power wire, as the name implies, carries the electricity for the device to run. In this case, for the servo motor to turn
It is time to code some neopixel! see you on Coding your first neopixel on MakeCode.
πTeacher's Corner - more about neopixels
For more in-depth resources about servo motors, check the following links:
Video - Dog collar
Video - Programmable LEDs
micro:bit guide - MakeCodeUsing neopixels with the micro:bit
Last updated
Was this helpful?