
Light Grid
3x3 grid of RGB LEDs (9 total)
Addressable RGB LED matrix with 9 individually controllable LEDs arranged in a 3x3 grid. Each LED can display up to 16 million different colors.
For ages 14 and up. Not a toy. Contains small parts: choking hazard. Keep away from children under 3. Adult supervision recommended.
Made by Atech ApS, Lille Strandstræde 6A, st. th., 1254 København K, Denmark.
Technical specifications
- Part
- NeoPixel 3x3 LED Grid
- Interface
- Digital
- Ports
- 1 port
- Current
- ~540 mA
- Size
- 19.5 x 19.5 x 9.5 mm
- Chip
- WS2812B (Worldsemi)
Pins
- 3.3V
- supply
- GND
- ground
- Data A
- LED data (V1.x, RGB)
- Data B
- LED data (V2.x, RGBW)
Key features
- 9 individually addressable LEDs
- Up to 16 million colors per LED
- Perfect for patterns, ambiance and motion
Common applications
Technical
LED Grid
NeoPixel 3x3 LED Grid3x3 grid of NeoPixel LEDs (9 total). Supports two module revisions transparently: the original RGB module (data on Line A) and the newer RGBW module (data on Line B). The driver writes to both lines every frame so generated code is identical regardless of which revision is plugged in. Brightness is capped at 20% of max to keep the newer RGBW module from being blinding.
set_pixelSet a single LED by index (0-8) to RGB colorset_allSet all LEDs to the same RGB colorset_rowSet an entire row to a colorset_columnSet an entire column to a colorclearTurn off all LEDsshowUpdate physical LEDs with current colorsset_brightnessSet global brightness (0-255). Values above 51 are clamped to 51 (20% cap).get_pixel_colorGet a pixel's color as packed uint32_t (0x00RRGGBB). Extract: r = (color >> 16) & 0xFF, g = (color >> 8) & 0xFF, b = color & 0xFF
NEOPIXEL 3x3 LED GRID:
- setPixel(index, r, g, b) sets one LED. Index 0-8 in row-major order (0=top-left, 8=bottom-right).
- setAll(r, g, b) sets all 9 LEDs to the same color.
- MUST call show() after any color changes. Without it nothing updates on the physical LEDs.
- setBrightness(value) controls global brightness. Call before show(). Hard-capped at 51 (20% of 255);
requesting anything higher just gets clamped. Scale your brightness ramps to 0-51, not 0-255.
- clear() + show() turns all LEDs off.
- The driver drives BOTH the old RGB module (Line A) and the new RGBW module (Line B) in parallel,
so user code is identical for either revision. Do not try to address the white channel directly;
the RGB API already produces correct output on both revisions.
- setRow(row, r, g, b) and setColumn(col, r, g, b) for row=0-2, col=0-2.
- Keep animations at 20-50ms delay between frames for smooth visuals.
- PERFORMANCE: show() takes ~5ms on ESP32 (the driver writes to both module
revisions every frame). Calling it in a tight loop, or on every tick of
an input driver like a rotary encoder, will accumulate visible catch-up
lag during fast user input.
RULE 1: only call show() when the colors actually changed. Track a dirty
flag or compare against the previous color, e.g.:
if (r != lastR || g != lastG || b != lastB) {
neopixel.setAll(r, g, b);
neopixel.show();
lastR = r; lastG = g; lastB = b;
}
RULE 2: for INTERACTIVE-INPUT loops (knob-to-color, slider-to-brightness,
etc.) that can fire many times per second, coalesce LED updates to ~30Hz.
Instead of calling show() on every loop tick, only actually push the
current color when >=33ms have passed since the last show(). The input
still polls fast; only the LED write is throttled. Example:
unsigned long now = millis();
if (dirty && now - lastShow >= 33) {
neopixel.setAll(r, g, b);
neopixel.show();
lastShow = now;
dirty = false;
}
For pulsing/breathing animations, cap the framerate the same way
(every 30-50ms).A 3x3 grid of clickable cells where each cell toggles between off and the active paint color. Put a color picker at the top to choose the active color, plus a 'Clear all' button. Auto-send the full grid state on every change, or batch behind a Send button.
| Pin | Line | Dir | Function |
|---|---|---|---|
| 1 | HV | – | not connected |
| 2 | 5V | – | not connected |
| 3 | 3.3V | input | supply |
| 4 | GND | – | ground |
| 5 | Data A | output | LED data (V1.x, RGB) |
| 6 | Data B | output | LED data (V2.x, RGBW) |
from p2p/ground_truth/hardware/prototyping_line/modules/neopixel_grid.md