Raspberry Pinout

PiBorg LedBorg

Il PiBorg LedBorg รจ un LED RGB ultra-luminoso per il 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
        lb.value = (r, g, b)
        sleep(0.01)
    for i in range(100):
        g = i / 100
        sleep(0.01)
        lb.value = (r, g, b)
    for i in range(100):
        b = i / 100
        lb.value = (r, g, b)
        sleep(0.01)

GPIO Zero docs

Details

LEDBorg