📊 micro:bit Data and Climate Change
  • Introduction
  • Data
  • Climate Change
  • Our Tools
    • 01- micro:bit
    • 02 - MakeCode
      • A - Events
      • B - Animations
      • C - Counting
      • D - If Hot
    • 03 - Servo Motor
      • Coding your first servo motor on MakeCode
    • 04 - Neopixel
      • Coding your first neopixel on MakeCode
  • Activities
    • Tools and Data Together
      • 01 - micro:bit and Data
      • 02 - Servo Motor and Data
      • 03 - Neopixel and Data
  • Showcase Projects
    • 01 - Air Pollution
      • A - Servo Motor
      • B - Neopixel Grid
    • 02 - Green Energy Forecast
    • 03 - Temperature Change
      • A - Neopixel Grid
      • B - Neopixel Ring
    • 04 - Heavy Precipitation Days
      • A - Neopixel Grid
      • B -Servo Motor
      • C-Neopixel Fairy Lights
    • 05 - Greenhouse Gas Emission
      • A - Neopixel Grid
      • B - Neopixel Fairy Lights
  • 🚀Extra Missions
  • Support Material
    • Data on the Run
    • Data Visualization Examples
    • Data Science of Climate Change by Lucie Luneau
    • Ideas from the Canadian Space Agency - CSA
    • CASC + Science Spotlight
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Our Tools

04 - Neopixel

PreviousCoding your first servo motor on MakeCodeNextCoding your first neopixel on MakeCode

Last updated 2 years ago

Was this helpful?

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 -

Video -

micro:bit guide -

🍎
Dog collar
Programmable LEDs
MakeCodeUsing neopixels with the micro:bit
micro:bit connected to a neopixel
Neopixel diagram
micro:bit connected to a neoplixel LED