Banana Pi BPI-Leaf-S3 with ESP32-S3 & microPython Neopixel show

Banana Pi BPI-Leaf-S3 with ESP32-S3 & microPython Neopixel show

Banana Pi BPI-Leaf-S3 GPIO define:

The BPI-Leaf-S3 carries a full color LED light bead, which is controlled by the GPIO48 of ESP32S3 chip.

MicroPython

Micropython establishment of operating environment - Banana Pi Wiki (banana-pi.org)

neopixel — control of WS2812 / NeoPixel LEDs — MicroPython

Make the lamp cycle display nine color program code

from machine import Pin
from neopixel import NeoPixel
import time

pin_48 = Pin(48, Pin.OUT)
np = NeoPixel(pin_48, 1,bpp=3, timing=1)

RED = (255, 0, 0)
ORANGE = (255, 100, 0)
YELLOW = (255, 255, 0)
GREEN = (0, 255, 0)
CYAN = (0, 255, 255)
BLUE = (0, 0, 255)
PURPLE = (180, 0, 255)
WHITE = (255, 255, 255)
OFF = (0, 0, 0)

color_list = [RED,ORANGE,YELLOW,GREEN,CYAN,BLUE,PURPLE,WHITE,OFF]
brightness = 0.1

while True:
    for i in color_list:
        color = (round(i[0]*brightness),round(i[1]*brightness),round(i[2]*brightness))
        np[0] = color
        np.write()
        time.sleep(1)