Page 1 of 1

P9813 driver: Grove Chainable RGB LEDs

Posted: Tue Jun 13, 2017 9:38 am
by mcauser
I've created a driver for working with Seeed Studio Grove Chainable RGB LEDs.
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()
Image