LedBorg
The PiBorg LedBorg is an ultra-bright RGB LED board for the Raspberry Pi.
from gpiozero import LedBorg
from time import sleep
lb = LedBorg()
while True:
r, g, b = 0, 0, 0
for i in range(100):
r = i / 100.0
lb.value = (r, g, b)
sleep(0.01)
for i in range(100):
g = i / 100.0
sleep(0.01)
lb.value = (r, g, b)
for i in range(100):
b = i / 100.0
lb.value = (r, g, b)
sleep(0.01)
详情 |