https://github.com/mcauser/micropython-p9813
Similar interface to a NeoPixel strip.
Code: Select all
from machine import Pin
import p9813
pin_clk = Pin(5, Pin.OUT)
pin_data = Pin(4, Pin.OUT)
num_leds = 10
chain = p9813.P9813(pin_clk, pin_data, num_leds)
# set the first LED to red
chain[0] = (255, 0, 0)
chain.write()
# make all LEDs green
chain.fill((0,255,0))
chain.write()