Skip to main content

wokwi-led-strip Reference

WS2812 NeoPixel Compatible LED Strip.

LED Strip

Pin names

NameDescription
VDDPositive voltage supply (input side)
DINData input signal
VSSGround (input side)
VDD.2Positive voltage supply (output side)
DOUTData output (for chaining to next strip)
VSS.2Ground (output side)

Attributes

NameDescriptionDefault value
pixelsNumber of LEDs in the strip"8"
pixelShapePixel rendering shape: "square", "circle", or """"
pixelSizeLED package size: "5050", "3535", or "2020""5050"

Chaining

You can chain multiple strips together by connecting the DOUT pin of one strip to the DIN pin of the next strip. All LEDs share the same data line and are addressed sequentially.

Pixel rendering

Shape

Set the pixelShape attribute to control how each LED is rendered:

  • "" (default) - Smooth rendering (one pixel per LED, scaled up)
  • "square" - Square pixel rendering
  • "circle" - Circular pixel rendering

Size

Set the pixelSize attribute to match real-world LED package dimensions:

ValuePackagePixel size
"5050"5×5 mm23 px
"3535"3.5×3.5 mm16 px
"2020"2×2 mm9 px

Arduino code example

#include <Adafruit_NeoPixel.h>

#define STRIP_PIN 2
#define NUM_PIXELS 8

Adafruit_NeoPixel strip(NUM_PIXELS, STRIP_PIN, NEO_GRB + NEO_KHZ800);

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

void loop() {
delay(10);
}

See also

Simulator examples