def show():
"""Output the buffer"""
global _gpio_setup
if not _gpio_setup:
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup([DAT,CLK,CS],GPIO.OUT)
_gpio_setup = True
GPIO.output(CS, 0)
_sof()
for pixel in pixels:
r, g, b, brightness = pixel
_write_byte(0b11100000 | brightness)
_write_byte(b)
_write_byte(g)
_write_byte(r)
_eof()
GPIO.output(CS, 1)
评论列表
文章目录