Codey OnlineArduino & ESP32 component library › WS2812 LED Ring 8-bit
WS2812 LED Ring 8-bit
Output

WS2812 LED Ring 8-bit

Led ring with 8x WS2812 leds

Width: 33.2 mm

Pinout — WS2812 LED Ring 8-bit

Pin Signal Description
DI data Data IN
5V power VCC 5V
GND ground GND
DO data Data OUT

Example wiring diagram — WS2812 LED Ring 8-bit

From To Wire
board:5V x1:5V red
board:GND x1:GND black
board:D6 x1:DI green

Example Arduino code — WS2812 LED Ring 8-bit

This example was written and compile-checked for the arduino-uno. Codey Online adapts it to any other supported board for you.

// Canonical beginner example for a WS2812 LED Ring 8-bit
// This sketch lights the 8 LEDs one at a time in a simple chase pattern.

#include <Adafruit_NeoPixel.h>

#define PIN 6
#define NUMPIXELS 8

Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

void setup() {
  pixels.begin();
  pixels.clear();
  pixels.show();
}

void loop() {
  // Chase a single red LED around the ring
  for (int i = 0; i < NUMPIXELS; i++) {
    pixels.clear();
    pixels.setPixelColor(i, pixels.Color(255, 0, 0));
    pixels.show();
    delay(150);
  }

  // Turn all LEDs off briefly between cycles
  pixels.clear();
  pixels.show();
  delay(300);
}

Related components

3W amplifier MAX98357A I2S DAC

3W amplifier MAX98357A I2S DAC

Active Buzzer Module

Active Buzzer Module

⚙️

LED

LED Matrix Module MAX7219

LED Matrix Module MAX7219

Build your Arduino or ESP32 project with AI

Describe what you want to build. Codey Online writes the code, draws the wiring diagram, compiles it and flashes your board straight from the browser.

Start for free