Skip to content
Free IDE

← Components

WS2812B NeoPixel ring

A ring of addressable RGB LEDs (WS2812B): with ONE pin you choose the color of each LED. The neopixel module already comes in the MicroPython firmware. You change the colors in memory (np[i] = (r, g, b)) and send everything at once with np.write(). Watch the current draw: many LEDs at strong white exceed what the USB can supply — use low brightness.

Pinout

DIN5VGNDDOUT12 LEDsDIN5VGNDDOUT
PinConnect toNote
DINGPIO (e.g. 5)data input of the first LED
5VVIN (5 V)
GNDGNDthe same GND as the ESP32
DOUTDIN of the next ring/stripdaisy chain; can be left unconnected
FastMindLocal AI assistant

The AI that remembers your life and lives on your computer

  • Long-term memory with the source of every answer
  • Works offline: your data stays on your PC
  • Reads PDFs, slides, photos and meeting recordings
Download free for Windows

Essential plan free forever

MicroPython example

from machine import Pin
import neopixel
import time

np = neopixel.NeoPixel(Pin(5), 12)  # DIN on GPIO5, 12-LED ring

np[0] = (255, 0, 0)  # LED 0 red (r, g, b from 0 to 255)
np.write()  # only shows after write()
time.sleep(1)

# a green dot going around the ring
while True:
    for i in range(12):
        np.fill((0, 0, 0))
        np[i] = (0, 40, 0)  # low brightness spares the USB
        np.write()
        time.sleep(0.1)

Specifications

ItemValueSource
PinsDIN, 5V, GND, DOUTTypical datasheet values
Current drawup to ~60 mA per LED at full white (rule consumo-usb)Typical datasheet values
Daisy chainDOUT of one goes to the DIN of the nextTypical datasheet values
Driverneopixel (already in the firmware)Docs.micropython.org/en/v1.29.0/esp32/quickref.html (NeoPixel driver)
LEDs on the ring8, 12, 16 or 24PyPlaca component catalog — Under review: quantities of the lab rings
DIN level with the ESP32 (3.3 V)the simulator accepts itUnder review: input threshold of the WS2812B powered with 5 V
LED 0 positionat the bottom, next to the pads; counting clockwiseUnder review: check on the lab ring

Values marked "Under review" will still be checked against the parts in the lab.

FastTeacherFor teachers

From the syllabus to a planned semester

  • Teaching plan and calendar built automatically
  • Class diary ready to paste into SIGA
  • Slides and exercise lists with answer keys
Meet FastTeacher

Free Community edition · Windows

FastMindLocal AI assistant

The AI that remembers your life and lives on your computer

  • Long-term memory with the source of every answer
  • Works offline: your data stays on your PC
  • Reads PDFs, slides, photos and meeting recordings
Download free for Windows

Essential plan free forever

FastTeacherFor teachers

From the syllabus to a planned semester

  • Teaching plan and calendar built automatically
  • Class diary ready to paste into SIGA
  • Slides and exercise lists with answer keys
Meet FastTeacher

Free Community edition · Windows