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

WS2812 LED Ring 8-bit

Led-ring met 8x WS2812-leds

Breedte: 33.2 mm

Pinout — WS2812 LED Ring 8-bit

Pin Signaal Beschrijving
DI data Data IN
5V power VCC 5V
GND ground GND
DO data Data OUT

Voorbeeld-aansluitschema — WS2812 LED Ring 8-bit

Van Naar Draad
board:5V x1:5V red
board:GND x1:GND black
board:D6 x1:DI green

Voorbeeld-Arduinocode — WS2812 LED Ring 8-bit

Dit voorbeeld is geschreven en compile-gecheckt voor de arduino-uno. Codey Online past het voor je aan naar elk ander ondersteund board.

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

Vergelijkbare componenten

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

Bouw je Arduino- of ESP32-project met AI

Beschrijf wat je wilt bouwen. Codey Online schrijft de code, tekent het aansluitschema, compileert het en flasht je board rechtstreeks vanuit de browser.

Gratis starten