WS2812 Control

Contents

WS2812 Control#

Harness the power of WS1280 LED strips with the PULSAR C6 board. Learn how to control RGB LED strips and create dazzling lighting effects using MicroPython.

This section describes how to control WS2812 LED strips using the PULSAR C6 board. The PULSAR C6 board has a GPIO pin embebbed connected to the single WS2812 LED.

Table 5 Pin Mapping for WS2812#

PIN

GPIO ESP32C6

DIN

8

rgb led

Fig. 19 WS2812 LED Strip#

Code Example#

Below is an example that demonstrates how to control WS1280 LED strips using the PULSAR C6 board

from machine import Pin
from neopixel import NeoPixel
np = NeoPixel(Pin(8), 1)
np[0] = (255, 128, 0) # set to red, full brightness

np.write()

Tip

for more information on the NeoPixel library, refer to the NeoPixel Library Documentation.