04 - Neopixel

micro:bit connected to a neoplixel LED
micro:bit connected to a 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.

circle-info

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.

Neopixel diagram

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.

chevron-rightConnecting a Neopixel to the micro:bithashtag

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.

chevron-right🍎Teacher's Corner - more about neopixelshashtag

For more in-depth resources about servo motors, check the following links:

Last updated

Was this helpful?