Guides · 9 min read

Raspberry Pi Pico Christmas Ornament: WS2812B NeoPixel Ring Star

Make a Raspberry Pi Pico Christmas ornament: 24-LED WS2812B ring, spinning, sparkle and snow effects in MicroPython, TTP223 touch modes, power bank, Pico W.

In this Raspberry Pi Pico Christmas ornament project you use a Pico and a 24-LED WS2812B ring to build a glowing Christmas star that spins, sparkles and snows, ready to hang on the tree. You write the code with MicroPython's built-in neopixel module, switch between effects with a TTP223 touch sensor and run the ornament cable-free from a USB power bank. There's almost no soldering, the total cost is low, and once you're done you have an ornament you can reuse every year.

In this guide you'll find how the ring works, the right wiring to the Pico, a first test sketch, the small maths tricks behind each of the five effects, an effect and brightness table, a complete program that remembers the last selected mode, and a calculation of how many hours it runs on a power bank. In the last section you'll make the same ornament controllable from your phone's browser with a Pico W.

24-LED WS2812B RGB LED ring
24-LED WS2812B ring: every LED has its own driver inside, so 24 different colours can be shown at once over a single data line.

Why a Pico and a WS2812B ring?

The WS2812B is an addressable LED that packs red, green and blue chips plus a tiny driver IC into the same 5050 package. The Pico sends 24-bit colour data down the data line one after another; the first LED takes its share and passes the rest on to the next. That way a single GPIO pin can light each of the 24 LEDs in its own colour. The ring shape fits neatly inside a star or a bauble. Because the neopixel module comes ready in the Pico's MicroPython firmware, you can start coding without downloading any library; for the basics of the WS2812B, see the WS2812B NeoPixel LED guide.

FeatureValue
Number of LEDs24 × WS2812B (5050 SMD)
Outer diameterAbout 6.5–8.5 cm (varies by maker)
Supply5 V (roughly 3.5–5.3 V)
CurrentUp to ~20 mA per colour channel per LED; ~60 mA per LED at full white
Idle currentAbout 0.5–1 mA per LED even when the LEDs are off
DataSingle line, 800 kHz; updating 24 LEDs takes about 0.7 ms
PinsDI (data in), DO (data out), 5V, GND

Parts

  • Raspberry Pi Pico (a Pico W or Pico 2 W if you want to pick colours from your phone) and a micro USB cable that carries data.
  • 24-LED WS2812B ring: 12- or 16-LED rings work too; just change the N value in the code.
  • TTP223 touch sensor module: For changing modes. You can use an ordinary push button instead.
  • 330 Ω resistor (for the data line) and an optional 100–470 µF electrolytic capacitor.
  • USB power bank: 5,000–10,000 mAh is enough. If the tree is near a socket, a USB charger works too.
  • Ornament body: A star made of cardboard, foam or 3D-printed plastic; tracing paper or thin white foam to soften the light.

Wiring table

ConnectionPico pinPhysical pinNote
Ring DI (data in)GP01330 Ω resistor in between
Ring 5VVBUS405 V from USB
Ring GNDGND38The capacitor's negative leg goes here too
TTP223 VCC3V3(OUT)36Runs on 3.3 V
TTP223 I/OGP1520HIGH when touched (A and B open)
TTP223 GNDGND23Any GND pin will do
Don't power the ring from the 3V3(OUT) pin: the Pico's 3.3 V regulator supplies at most 300 mA, and that limit is exceeded as soon as a few LEDs go full white. Power the ring from VBUS (USB 5 V). At 5 V the WS2812B's data input technically wants about 3.5 V, while the Pico sends 3.3 V; with a short data wire (under 10 cm) most rings work fine. If the first LED flickers or colours come out random, shorten the data wire, place the 330 Ω resistor close to the ring's input, or add a level shifter such as the 74AHCT125.
TTP223 capacitive touch sensor module
TTP223 touch sensor: the I/O pin goes HIGH when your finger comes close. It also senses through thin cardboard or plastic, so it can be hidden inside the ornament.

First test: lighting the ring with the neopixel module

MicroPython
1from machine import Pin
2import neopixel, time
3
4N = 24                                  # halkadaki LED sayısı / LEDs on the ring
5np = neopixel.NeoPixel(Pin(0), N)       # DIN -> 330 ohm -> GP0
6
7for i in range(N):
8    np[i] = (40, 0, 0) if i % 2 == 0 else (0, 40, 0)   # kırmızı-yeşil sıra / red-green pattern
9    np.write()                          # renkleri halkaya gönder / send colours to the ring
10    time.sleep_ms(50)

When you run the code in Thonny, the ring's LEDs should light up one by one in red and green. We deliberately kept the colour values at 40: 255 is dazzling and draws needless current during a test. The np[i] = (r, g, b) line sets LED number i's colour in memory, but nothing changes on the ring yet; the colours are only sent when np.write() is called. The WS2812B actually expects colours in green, red, blue (GRB) order; the neopixel module handles that for you, so you always write (red, green, blue). If the ring doesn't light at all, you may have connected the data to the wrong end: it must go to the pad marked DI or IN, while DO or OUT goes to the next ring.

Effect and brightness table

ModeEffectColoursFrame timeApprox. current (0.2 brightness, ring + Pico)
0Spinning cometOne lap red, one lap green40 ms~65 mA
1Golden sparkleWarm base glow + random golden sparks60 ms~70 mA
2SnowfallNight-blue background, white snowflakes40 ms~110 mA
3Breathing starGolden yellow, slowly brightening and fading30 ms~125 mA
4Rotating rainbowThe whole colour wheel30 ms~145 mA

Here's a rough way to work out the current: each colour channel draws about 20 mA at full value (255) and proportionally less at lower values. So one LED draws roughly 20 mA × (r + g + b) / 255; add about 1 mA of idle current per LED and the Pico's own 20–25 mA. The code has three brightness steps: 0.08 (dim, for night), 0.2 (default) and 0.4 (for daylight). Going above 0.4 tires the eyes and quickly shortens battery life.

Full code: five effects and mode switching with the TTP223

Save the program below to the Pico as main.py in Thonny, so the ornament starts by itself as soon as it's plugged into the power bank. A short touch on the TTP223 moves to the next effect, a touch longer than 0.7 seconds changes the brightness step. Your choice is written to the susu.txt file and the ornament starts with the same effect next time.

MicroPython
1from machine import Pin
2import neopixel, time, random, math
3
4N = 24                                  # halkadaki LED sayısı / LEDs on the ring
5np = neopixel.NeoPixel(Pin(0), N)       # DIN -> 330 ohm -> GP0
6touch = Pin(15, Pin.IN)                 # TTP223 I/O (A ve B açık / A and B open)
7
8LEVELS = (0.08, 0.2, 0.4)               # parlaklık kademeleri / brightness steps
9FRAME_MS = (40, 60, 40, 30, 30)         # her efektin kare süresi / frame time of each effect
10NAMES = ("donen", "parilti", "kar", "nefes", "gokkusagi")
11LONG_MS = 700                           # uzun dokunuş / long touch
12
13buf = [[0, 0, 0] for _ in range(N)]     # ham renkler 0-255 / raw colours 0-255
14flakes = []                             # kar taneleri / snowflakes
15step = 0
16
17
18def load():
19    try:
20        with open("susu.txt") as f:
21            m, b = f.read().split(",")
22            return int(m) % len(NAMES), int(b) % len(LEVELS)
23    except (OSError, ValueError):
24        return 0, 1
25
26
27def save():
28    with open("susu.txt", "w") as f:
29        f.write("%d,%d" % (mode, level))
30
31
32def show():
33    k = LEVELS[level]
34    for i in range(N):
35        r, g, b = buf[i]
36        np[i] = (int(r * k), int(g * k), int(b * k))
37    np.write()
38
39
40def fade(f):
41    for c in buf:
42        c[0] = int(c[0] * f)
43        c[1] = int(c[1] * f)
44        c[2] = int(c[2] * f)
45
46
47def wheel(h):                           # 0-255 renk tekerleği / 0-255 colour wheel
48    h %= 256
49    if h < 85:
50        return [255 - h * 3, h * 3, 0]
51    if h < 170:
52        h -= 85
53        return [0, 255 - h * 3, h * 3]
54    h -= 170
55    return [h * 3, 0, 255 - h * 3]
56
57
58def spinning():                         # dönen kuyruklu yıldız / spinning comet
59    fade(0.7)
60    head = step % N
61    buf[head] = [255, 0, 0] if (step // N) % 2 == 0 else [0, 255, 0]
62
63
64def twinkle():                          # altın parıltı / golden sparkle
65    fade(0.88)
66    for c in buf:                       # sıcak taban ışığı / warm base glow
67        c[0] = max(c[0], 30)
68        c[1] = max(c[1], 10)
69    if random.randint(0, 99) < 35:
70        buf[random.randint(0, N - 1)] = [255, 170, 40]
71
72
73def snow():                             # tepeden iki yana akan kar / snow falling down both sides
74    for c in buf:
75        c[0], c[1], c[2] = 0, 0, 25     # gece mavisi / night blue
76    for j in range(len(flakes)):        # her tane bir LED aşağı / each flake moves one LED down
77        flakes[j] += 1
78    while flakes and flakes[0] > N // 2:
79        flakes.pop(0)                   # en alta ulaşan silinir / remove flakes at the bottom
80    if random.randint(0, 99) < 20:
81        flakes.append(0)                # tepede yeni tane / new flake at the top
82    for k in flakes:
83        buf[k % N] = [230, 230, 255]
84        buf[(N - k) % N] = [230, 230, 255]
85
86
87def breathe():                          # yıldız nefesi / breathing star
88    v = (1 - math.cos(step * 2 * math.pi / 100)) / 2
89    for i in range(N):
90        buf[i] = [int(255 * v), int(150 * v), int(20 * v)]
91
92
93def rainbow():                          # dönen gökkuşağı / rotating rainbow
94    for i in range(N):
95        buf[i] = wheel(i * 256 // N + step * 3)
96
97
98EFFECTS = (spinning, twinkle, snow, breathe, rainbow)
99mode, level = load()
100touch_start = None
101
102while True:
103    if touch.value() and touch_start is None:
104        touch_start = time.ticks_ms()               # dokunuş başladı / touch started
105    elif not touch.value() and touch_start is not None:
106        held = time.ticks_diff(time.ticks_ms(), touch_start)
107        touch_start = None
108        if held >= LONG_MS:
109            level = (level + 1) % len(LEVELS)      # uzun: parlaklık / long: brightness
110        else:
111            mode = (mode + 1) % len(NAMES)          # kısa: sonraki efekt / short: next effect
112            flakes = []                     # karı sıfırla / reset the snow
113        save()
114        print("efekt / effect:", NAMES[mode], "parlaklik / brightness:", LEVELS[level])
115
116    EFFECTS[mode]()
117    show()
118    step += 1
119    time.sleep_ms(FRAME_MS[mode])
CodeWhat it does
bufHolds the raw colours of the 24 LEDs from 0 to 255; the effects always write here
show()Multiplies the raw colours by the selected brightness and sends them to the ring; brightness is applied in one place
fade(f)Dims every LED by the factor f; 0.7 leaves a short trail, 0.88 a long one
wheel(h)Turns a single number from 0 to 255 into a colour blending red, green and blue
touch_start / heldMeasures how long the touch lasted; the 700 ms limit separates short and long touches
load() / save()Writes the mode and brightness to the Pico's file system and reads them back at start-up

How do the effects work?

The spinning comet dims the whole ring by 30 percent every frame and lights the next LED at full brightness. Because the earlier LEDs fade a little more each frame, a soft tail forms behind the head on its own: 0.7 × 0.7 × 0.7 ≈ 0.34, so an LED three frames behind is at a third of its original brightness. Each time the head completes a lap it switches from red to green or back. The golden sparkle effect dims the ring more slowly but never lets any LED drop below a warm base glow; every frame, with a 35 percent chance, a random LED flares gold and slowly fades.

Snowfall treats the LED at the very top of the ring (number 0) as the sky and the one at the bottom (number 12) as the ground. A new snowflake is born at the top and moves down one LED per frame; the same flake is mirrored on both sides of the ring, so the snow seems to drift down both sides at once. The breathing star smoothly moves the brightness between zero and one with the formula (1 − cos(2π × step / 100)) / 2; with 30 ms frames, one breath takes about 3 seconds. The rainbow gives each LED an evenly spaced hue on the colour wheel and shifts all the hues slightly every frame.

For the snow effect to look right, put LED number 0 (usually the LED closest to the DI pad) at the top when you mount the ring in the ornament. To find it, write only np[0] = (40, 0, 0) in the first test code and run it; the LED that lights up should be at the top. If you mounted the ring upside down, just turn the ornament instead of changing the code.

Running on a power bank and battery life

The capacity printed on a power bank is the capacity of its 3.7 V cells. Because the output is 5 V and the converter runs at about 85 percent efficiency, the capacity you can actually use is capacity × 3.7 / 5 × 0.85; a 10,000 mAh power bank gives about 6,300 mAh at 5 V. The run time is usable capacity / average current. You can try other battery and current values with the battery life calculator.

BrightnessTotal current in rainbow mode5,000 mAh power bank10,000 mAh power bank
0.08 (dim)~85 mA~37 hours~74 hours
0.2 (default)~145 mA~22 hours~43 hours
0.4 (bright)~240 mA~13 hours~26 hours
Some power banks switch themselves off when the current drops below about 50–100 mA, thinking the device is fully charged. That's usually why the ornament goes dark after a few minutes on the dim step. Choose a power bank with a low-current mode, or raise the lowest step from 0.08 to 0.12 so the current stays above the cut-off.

Picking colours from your phone with a Pico W

If you're using a Pico W or Pico 2 W, you can add a small web page to the ornament. The program below connects to your home Wi-Fi, prints an IP address in the Shell, and when you open that address on your phone you get a colour picker and a list of effects. The colour you pick shows up on the ring instantly in solid, sparkle or rainbow mode. The lights and the web server run side by side with asyncio; neither waits for the other. The basics of the web server are explained in detail in the Pico W web server guide.

MicroPython
1import network, asyncio, neopixel, random, time
2from machine import Pin
3
4SSID = "AgAdi"                          # Wi-Fi adın (2,4 GHz) / your Wi-Fi name (2.4 GHz)
5PASSWORD = "Sifre123"                   # Wi-Fi şifren / your Wi-Fi password
6N = 24
7np = neopixel.NeoPixel(Pin(0), N)       # DIN -> 330 ohm -> GP0
8BRIGHT = 0.2                            # genel parlaklık / overall brightness
9
10color = [255, 120, 20]                  # telefondan seçilen renk / colour picked on the phone
11mode = 1                                # 0 sabit, 1 parıltı, 2 gökkuşağı / 0 solid, 1 sparkle, 2 rainbow
12
13PAGE = """<!DOCTYPE html><html><head><meta charset="utf-8">
14<meta name="viewport" content="width=device-width, initial-scale=1"><title>Noel Susu</title></head>
15<body style="font-family:sans-serif;text-align:center">
16<h2>Noel Susu / Ornament</h2>
17<form action="/" method="get">
18<p><input type="color" name="c" value="#ff7814" style="width:120px;height:80px"></p>
19<p><select name="m"><option value="0">Sabit / Solid</option><option value="1" selected>Parilti / Sparkle</option>
20<option value="2">Gokkusagi / Rainbow</option></select></p>
21<p><button style="font-size:22px">Uygula / Apply</button></p>
22</form></body></html>"""
23
24
25def connect():
26    wlan = network.WLAN(network.STA_IF)
27    wlan.active(True)
28    wlan.connect(SSID, PASSWORD)
29    for _ in range(20):
30        if wlan.isconnected():
31            break
32        time.sleep(1)
33    print("Telefonda ac / open on the phone: http://" + wlan.ifconfig()[0])
34
35
36def parse(query):
37    global mode
38    for part in query.split("&"):
39        if part.startswith("c=") and len(part) >= 8:
40            hexcode = part[-6:]                         # "%23ff7814" -> "ff7814"
41            color[0] = int(hexcode[0:2], 16)
42            color[1] = int(hexcode[2:4], 16)
43            color[2] = int(hexcode[4:6], 16)
44        elif part.startswith("m=") and part[2:].isdigit():
45            mode = int(part[2:]) % 3
46
47
48async def handle(reader, writer):
49    line = await reader.readline()                      # "GET /?c=%23ff7814&m=1 HTTP/1.1"
50    while True:                                         # başlıkları atla / skip the headers
51        h = await reader.readline()
52        if not h or h == b"\r\n":
53            break
54    try:
55        path = line.decode().split(" ")[1]
56        if "?" in path:
57            parse(path.split("?", 1)[1])
58    except (IndexError, ValueError):
59        pass
60    writer.write(b"HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n")
61    writer.write(PAGE.encode())
62    await writer.drain()
63    writer.close()
64    await writer.wait_closed()
65
66
67def wheel(h):
68    h %= 256
69    if h < 85:
70        return (255 - h * 3, h * 3, 0)
71    if h < 170:
72        h -= 85
73        return (0, 255 - h * 3, h * 3)
74    h -= 170
75    return (h * 3, 0, 255 - h * 3)
76
77
78async def lights():
79    step = 0
80    while True:
81        for i in range(N):
82            if mode == 0:
83                c = color
84            elif mode == 1:                             # rastgele LED'ler parlar / random LEDs flare
85                k = 1.0 if random.randint(0, 99) < 8 else 0.25
86                c = [int(x * k) for x in color]
87            else:
88                c = wheel(i * 256 // N + step * 3)
89            np[i] = (int(c[0] * BRIGHT), int(c[1] * BRIGHT), int(c[2] * BRIGHT))
90        np.write()
91        step += 1
92        await asyncio.sleep_ms(60 if mode == 1 else 30)
93
94
95async def main():
96    connect()
97    await asyncio.start_server(handle, "0.0.0.0", 80)
98    await lights()                                      # ışıklar sonsuza kadar döner / lights run forever
99
100
101asyncio.run(main())

When the browser submits the form, the address looks like /?c=%23ff7814&m=1: %23 is the # sign at the start of the colour code. The parse() function takes the last six characters and splits them into three two-digit hexadecimal numbers, the red, green and blue values. The phone and the Pico must be on the same network; the Pico W only connects to 2.4 GHz networks. If you don't want a different IP on every start, reserve a fixed IP for the Pico in your router settings.

Mounting the ornament and styling tips

  • Soften the light: Place tracing paper or white foam 1–2 cm in front of the ring. The LEDs then look like one glowing star rather than separate dots.
  • Put it inside a star: Cut two cardboard stars, glue the ring between them, place the Pico and power bank at the foot of the tree and run the three wires (5V, GND, data) through the branches in a green cable.
  • Hide the touch sensor: Tape the TTP223 to the back of the ornament. The sensor also works through 1–2 mm of cardboard or plastic.
  • Several ornaments: Connect the first ring's DO to the second ring's DI and set N to 48 to drive two ornaments from one pin; double your power calculation.
  • Mind the heat: At 0.2 brightness the ring doesn't even get warm, but if it will run for hours at 0.4 inside a closed box, add small ventilation holes.

Common mistakes and fixes

SymptomLikely causeFix
No LED lights upData is on the DO pad or the GND isn't sharedConnect the data to DI and join the ring's GND to the Pico's GND
First LED flickers, random coloursThe 3.3 V data signal is marginal or the wire is longShorten the data wire, add the 330 Ω resistor, use a level shifter if needed
Wrong colours (green instead of red)The ring uses a different colour order (e.g. RGB instead of GRB)Add np.ORDER = (0, 1, 2, 3) after the np = neopixel.NeoPixel(...) line and try again
The touch sensor doesn't respondThe TTP223 calibrated while a finger was touching it at power-upTake your hand away and replug the Pico's USB; don't touch the sensor at start-up
The Pico doesn't start the effect at power-upThe file wasn't saved as main.pyIn Thonny: Save as > Raspberry Pi Pico > main.py
The ornament goes dark after a few minutesThe power bank switches off at low currentUse a power bank with a low-current mode or raise the lowest brightness
To add a new effect, write a function, add it to the EFFECTS list, and put one more value in the FRAME_MS and NAMES lists. For example, a "Christmas colours" effect that slowly turns the whole ring from red to green takes five lines if you only feed wheel() hues between 0 and 85.

This Christmas ornament, made from a Pico, a 24-LED ring and a touch sensor, teaches addressable LEDs, brightness control without PWM, saving settings to a file and battery calculations in a single project. You can add new effects to your ornament by looking at the step-by-step circuit diagrams and code in the BlueGrays app for basic Pico light projects such as LED fading, an RGB colour cycle and chasing LEDs, as well as WS2812B projects like a police light and animations.

Frequently asked questions

Can a Raspberry Pi Pico drive WS2812B LEDs directly?

Yes. MicroPython's neopixel module comes ready on the Pico and handles the WS2812B's precise timing itself. The data line can go to any GP pin; the LEDs, however, should be powered with 5 V from VBUS, not from the Pico's 3.3 V pin.

How much current does a 24-LED WS2812B ring draw?

Each LED draws about 60 mA at full white, so the worst case for 24 LEDs is about 1.44 A. With real effects at 0.2 brightness this drops to around 60–150 mA. Limiting brightness in code extends battery life and keeps the USB line from being strained.

Is the Pico's 3.3 V data signal enough for WS2812B?

Technically the WS2812B wants a data level of about 3.5 V on a 5 V supply, but with a short wire most rings work fine at 3.3 V. If the first LED flickers, shorten the wire and put the 330 Ω resistor close to the ring. The definitive fix is a level shifter such as the 74AHCT125.

How long does a Pico Christmas ornament run on a power bank?

A 10,000 mAh power bank delivers about 6,300 mAh at 5 V. At the default 0.2 brightness the ornament draws about 145 mA, which means more than 40 hours of run time. Halving the brightness nearly doubles that.

How do I make MicroPython code run automatically when the Pico starts?

Just save the code to the Raspberry Pi Pico as main.py in Thonny. On every power-up the Pico runs boot.py first and then main.py. To stop the code, press Stop in Thonny or use Ctrl+C.

Can Christmas lights be controlled from a phone with a Pico W?

Yes. The Pico W can join your home Wi-Fi and run a small web server; when you open the Pico's IP address in your phone's browser, a colour picker and effect buttons appear. Thanks to asyncio, the light effects and the web server run at the same time.

See all projects
Raspberry Pi Pico PWM LED Fade (Breathing Effect)
PI-14Beginner

Raspberry Pi Pico PWM LED Fade (Breathing Effect)

The LED doesn't just blink anymore, it breathes! With the Raspberry Pi Pico's PWM (Pulse Width Modulation), the LED's brightness slowly rises and then slowly fades, a calm "breathing" effect like a sleeping laptop's light. You'll learn the machine.PWM class, the 16-bit brightness value from 0–65535 with duty_u16() and the PWM frequency.

4
Raspberry Pi Pico RGB LED Color Cycle (3-Channel PWM)
PI-15Beginner

Raspberry Pi Pico RGB LED Color Cycle (3-Channel PWM)

One LED, millions of colors! An RGB LED actually holds 3 separate LEDs: red, green and blue. Set the brightness of each one separately with the Pico's 3 PWM channels and the colors mix: red + green = yellow, green + blue = cyan, all three = white. In this project the LED cycles through 8 colors.

6
Raspberry Pi Pico Chasing LED (6 LEDs)
PI-7Beginner

Raspberry Pi Pico Chasing LED (6 LEDs)

The classic "running LED" animation with the Pico, 6-LED version! Six LEDs light up one after another from left to right, as if the light were walking along the row. You'll learn Python lists (LED_PINS = [14, 13, 12, 11, 10, 9]), list comprehensions, controlling pins with a for loop and enumerate(). Six LEDs go on pins GP9-GP14, each with a 220Ω current-limiting resistor.

5.0(1)
9
Raspberry Pi Pico Knight Rider LED Scanner (6 LED Back-Forth)
PI-8Beginner

Raspberry Pi Pico Knight Rider LED Scanner (6 LED Back-Forth)

Classic "Knight Rider" LED scanner effect with Pico! 6 LEDs go left-to-right, then right-to-left, forever. Like the front grille of KITT car from the iconic 80s TV series. This project is an upgrade of the Chasing LED project: same 6 LED circuit (GP9-GP14), different code pattern. Learn reversed() function for list reversal, two separate for loops for back-and-forth pattern, and generating multiple animations on same circuit.

5.0(1)
14
Using a WS2812B LED Strip
AR-69Intermediate
Premium

Using a WS2812B LED Strip

Meet a smart LED strip where you can colour every single light on its own. The Arduino first lights the first five LEDs red, a second later turns the other five blue, then switches them all off and…

4.8(54)
70
WS2812B LED Chaser
AR-71Intermediate
Premium

WS2812B LED Chaser

On a strip of ten LEDs, a green dot of light moves from start to finish one LED at a time, then jumps back to the beginning; it stays on each LED for a third of a second.

4.8(58)
75
WS2812B Animation 1
AR-75Intermediate
Premium

WS2812B Animation 1

On a strip of 56 LEDs, all the colours of the rainbow line up side by side and flow without ever stopping, as if a river of light were gliding along the strip.

4.9(69)
89
ESP32 WS2812B NeoPixel Strip Control
ES-24Intermediate
Premium

ESP32 WS2812B NeoPixel Strip Control

WS2812B (NeoPixel) addressable LEDs are smart RGB LEDs that can be chained and controlled from a single data pin. In this project we drive an 8-LED WS2812B strip with the Adafruit_NeoPixel library and create a smooth rainbow animation. The ESP32's 3.3V logic works with most WS2812B batches; if it gets unstable, we show the fix with a 470Ω series resistor and a 1000µF capacitor. The animation shifts the hue in HSV color space.

4.9(19)
30