Skip to main content

wokwi-led-ring Reference

WS2812 NeoPixel Compatible LED Ring.

Pin names

NameDescription
GNDGround
VCCPositive voltage supply
DINData input signal
DOUTData output (for chaining)

Attributes

NameDescriptionDefault value
pixelsNumber of LEDs in the ring"16"

Chaining

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

Arduino code example

#include <Adafruit_NeoPixel.h>

#define RING_PIN 2
#define NUM_PIXELS 16

Adafruit_NeoPixel ring(NUM_PIXELS, RING_PIN, NEO_GRB + NEO_KHZ800);

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

void loop() {
delay(10);
}

See also

Simulator examples