Source: https://mokxi.com/teachers/plans/addressable-leds
Updated: 2026-11-19

Lesson plan

# Addressable LEDs: strips and matrices lesson plan

WS2812B strips, rings and panels on the Uno: the one-wire timing, NeoPixel basics, FastLED with HSV and palettes, mapping a serpentine matrix, power budgets and injection, and a sound-reactive aurora wall for the boss.

4 chapters, 7 lessons, about 6 hours, on the Arduino Uno R3. Every lesson runs in the browser, with nothing to install.

Start a class from this course

The unit

## Objectives and materials

### By the end, students can

- How the WS2812B signal works, and the NeoPixel library.
- FastLED, hue and saturation, palettes and smooth blends.
- Folding a strip into a matrix, and feeding it safely.
- A light wall that dances to the room.

### Materials for the whole unit

- Addressable RGB LEDs
- Arduino Uno R3
- Half breadboard
- Potentiometer
- Pushbutton
- Resistor
- Sound sensor, KY-038

Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.

Chapter 1. About 1 h 45 min

## One wire, many lights

How the WS2812B signal works, and the NeoPixel library.

Lesson | Time | What students do

WS2812 timing: one wire, many lights How sixteen LEDs share one data wire: 24 bits each in GRB order at 800 kHz, each LED keeping its own and passing the rest on, and what show() costs in microseconds. | 55 min

- Run it: sixteen lights, one wire
- Each LED keeps 24 bits and passes the rest
- Bits measured in microseconds
- A longer strip than the sketch knows
- Tell the sketch
- The comet
- Wiring a real strip

NeoPixel basics: a fuel gauge Adafruit_NeoPixel as a rocket fuel gauge: setPixelColor, Color, setBrightness and show, a bar from red to green on a knob, and a launch that drains it. | 50 min

- Run it: a rocket fuel gauge
- Four calls do almost everything
- Fill the tank
- Launch!
- Light the empty tank
- Three bytes an LED

### Materials

- Addressable RGB LEDs
- Arduino Uno R3
- Half breadboard
- Potentiometer
- Pushbutton
- Resistor

### Check for understanding

Each student finishes "NeoPixel basics: a fuel gauge" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Three bytes an LED".

Chapter 2. About 1 h 40 min

## Color like a pro

FastLED, hue and saturation, palettes and smooth blends.

Lesson | Time | What students do

FastLED and HSV: a color wheel FastLED on a 16 LED ring: CRGB and CHSV, hue as one byte that wraps by itself, a spinning rainbow, and saturation on a knob from vivid down to white. | 50 min

- Run it: a spinning color wheel
- Hue, saturation, value
- A byte that wraps
- Drain the color
- Half a rainbow
- Why HSV wins

Palettes and blending Ocean waves from a 16-color palette with linear blending, a button that crossfades to lava, forest and a custom aurora palette, and how many frames a blend takes. | 50 min

- Run it: ocean waves
- Sixteen colors become 256
- Change the mood
- How long a blend takes
- A faster crossfade?
- A palette of your own

### Materials

- Addressable RGB LEDs
- Arduino Uno R3
- Half breadboard
- Potentiometer
- Pushbutton
- Resistor

### Check for understanding

Each student finishes "Palettes and blending" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "A palette of your own".

Chapter 3. About 1 h 40 min

## Panels and power

Folding a strip into a matrix, and feeding it safely.

Lesson | Time | What students do

Matrix mapping: a serpentine panel A 16x8 panel is one long strip folded into rows: an XY() function, the zigzag of a serpentine panel, and a pixel-art spaceship flying over the stars. | 50 min

- Run it: a spaceship
- Rows of sixteen
- The zigzag
- The wrong panel
- Match the sketch to the panel
- Draw your own sprite

Power budget and injection Why 128 LEDs could pull 7.7 A from a 500 mA port: adding up a frame, limiting the brightness to a budget, sizing a supply, and injecting power along a long strip. | 50 min

- Run it: 7.7 amps?
- Add up the frame
- Color is cheaper than white
- A scene that fits
- A bigger supply
- Power injection

### Materials

- Addressable RGB LEDs
- Arduino Uno R3
- Half breadboard
- Potentiometer
- Pushbutton
- Resistor

### Check for understanding

Each student finishes "Power budget and injection" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Power injection".

Chapter 4. About 1 h 5 min

## Boss project

A light wall that dances to the room.

Lesson | Time | What students do

Boss: a reactive light wall An aurora light wall that listens: green and violet curtains over the stars that climb with the sound level from a KY-038, and a meteor on every clap. | 65 min

- Run it: the aurora wall
- Curtains from noise
- A microphone with no amplifier
- Turn up the room
- Clap for a meteor
- Solar storm
- A storm that comes easier
- Make it your wall

### Materials

- Addressable RGB LEDs
- Arduino Uno R3
- Half breadboard
- Resistor
- Sound sensor, KY-038

### Check for understanding

Each student finishes "Boss: a reactive light wall" on their own, without opening the hints. The simulator checks 8 of its 8 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Make it your wall".

Your class

## Teach this unit as a class

Start a class from this course and its 7 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.

The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.

Start a class from this course See the demo class

More units

## Other lesson plans

Electronics basics 20 lessons, about 10 h. Embedded on the Arduino Uno 16 lessons, about 12 h. Embedded on the ESP32-C3 13 lessons, about 11 h. Embedded on the Raspberry Pi Pico 7 lessons, about 6 h. Build your own fight stick 5 lessons, about 4 h. Embedded on the STM32F411 6 lessons, about 6 h. C++ on a board 13 lessons, about 10 h. Digital logic and memory 4 lessons, about 4 h. Interactive devices on the Uno 9 lessons, about 8 h. From gates to a computer 23 lessons, about 16 h. Build a claw machine 8 lessons, about 6 h. Every unit All the courses as ready-made units, on the teachers page.
