P9813 driver: Grove Chainable RGB LEDs

Discuss development of drivers for external hardware and components, such as LCD screens, sensors, motor drivers, etc.
Target audience: Users and developers of drivers.
Post Reply
User avatar
mcauser
Posts: 507
Joined: Mon Jun 15, 2015 8:03 am

P9813 driver: Grove Chainable RGB LEDs

Post by mcauser » Tue Jun 13, 2017 9:38 am

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

Post Reply