Skip to main content
WS2812 NeoPixel Compatible LED Matrix.

Pin names

DIN
pin
Data input signal
VDD
pin
Positive voltage supply
VSS
pin
Ground
DOUT
pin
Data output (for chaining to next panel)

Attributes

rows
string
default:"8"
Number of rows
cols
string
default:"8"
Number of columns
layout
string
default:""
Pixel wiring pattern: "" (progressive) or “serpentine”
brightness
string
default:"1"
Brightness multiplier
pixelShape
string
default:""
Pixel rendering shape: “square”, “circle”, or "" (smooth)
pixelSize
string
default:"5050"
LED package size: “5050”, “3535”, or “2020”

Layout

The layout attribute controls how pixel indices map to physical positions in the matrix:
  • "" (default) - Progressive: all rows go left-to-right
  • "serpentine" - Alternating row direction (left-to-right, then right-to-left)
Most real-world WS2812 matrix panels use serpentine wiring.

Pixel rendering

For pixel shape and size options, see wokwi-led-strip: Pixel rendering.

Arduino code example

#include <Adafruit_NeoPixel.h>

#define MATRIX_PIN 2
#define ROWS 8
#define COLS 8
#define NUM_PIXELS (ROWS * COLS)

Adafruit_NeoPixel matrix(NUM_PIXELS, MATRIX_PIN, NEO_GRB + NEO_KHZ800);

void setup() {
  matrix.begin();
  for (int i = 0; i < NUM_PIXELS; i++) {
    matrix.setPixelColor(i, matrix.Color(0, 0, 150)); // Blue
  }
  matrix.show();
}

void loop() {
  delay(10);
}

See also

Simulator examples

Build docs developers (and LLMs) love