Codey OnlineBiblioteca de componentes Arduino y ESP32 › WS2812 LED Ring 8-bit
WS2812 LED Ring 8-bit
Salida

WS2812 LED Ring 8-bit

Anillo de LED con 8 LED WS2812

Ancho: 33.2 mm

Pinout — WS2812 LED Ring 8-bit

Pin Señal Descripción
DI data Data IN
5V power VCC 5V
GND ground GND
DO data Data OUT

Esquema de cableado de ejemplo — WS2812 LED Ring 8-bit

Desde Hasta Cable
board:5V x1:5V red
board:GND x1:GND black
board:D6 x1:DI green

Código Arduino de ejemplo — WS2812 LED Ring 8-bit

Este ejemplo se escribió y verificó por compilación para arduino-uno. Codey Online lo adapta a cualquier otra placa compatible.

// 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);
}

Componentes relacionados

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

Crea tu proyecto de Arduino o ESP32 con IA

Describe lo que quieres construir. Codey Online escribe el codigo, dibuja el esquema de conexiones, lo compila y graba tu placa directamente desde el navegador.

Empieza gratis