Addressable RGB LED Control

Contents

Addressable RGB LED Control#

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

This section describes how to control addressable RGB LED strips (WS2812/WS2811 compatible) using the PULSAR H2 board. The PULSAR H2 board has a GPIO pin embedded connected to a single addressable RGB LED.

Table 9 Pin Mapping for Addressable RGB LED#

PIN

GPIO ESP32H2

DIN

8

rgb led

Fig. 24 Addressable RGB LED Strip#

Code Example#

Below is an example that demonstrates how to control addressable RGB LED strips using the PULSAR H2 board

from machine import Pin
from neopixel import NeoPixel

# Initialize addressable RGB LED on GPIO8
rgb_led = NeoPixel(Pin(8), 1)

# Set color (Red, Green, Blue) - orange color
rgb_led[0] = (255, 128, 0)

# Apply the color change
rgb_led.write()

Tip

Compatibility Note: This addressable RGB LED is compatible with WS2812/WS2811 protocols. For more information on the MicroPython implementation, refer to the NeoPixel Library Documentation.

Supported Protocols: WS2812, WS2812B, WS2811, SK6812 and other compatible addressable RGB LEDs.