Blinkt!¶
- Blinkt! is a product which contains 8 multicoloured LEDs that can be addressed individually each with it’s own colour and brightness.
https://github.com/pimoroni/blinkt - see examples directory
##
# Quick start using the Blinkt LED strip
#
# LED's numbered 0-7
# Colour 0 to 255 in R,G,B order
# Brightness 0.0(off) - 1.0(full brightness)
from blinkt import NUM_PIXELS, set_pixel, set_brightness, show, clear
from time import sleep
# set default brightness
set_brightness(0.1)
# Clear all pixel data (set to black)
clear()
show()
# Set first pixel (0) to cyan at brightness 20% (pixel, r, g, b, brightness)
set_pixel(0, 0, 255, 255, 0.2)
show()
sleep(5)
# Running LED
for j in range(100):
for i in range(NUM_PIXELS):
clear()
set_pixel(i, 255, 0, 255)
show()
time.sleep(0.5)