fusion_hat.modules.rgb_led module

class fusion_hat.modules.rgb_led.RGB_LED(r_pin: PWM, g_pin: PWM, b_pin: PWM, common: int = 1)[source]

Bases: object

Simple 3 pin RGB LED

ANODE = 1

Common anode

CATHODE = 0

Common cathode

color(color: str | Tuple[int, int, int] | List[int] | int)[source]

Write color to RGB LED

Parameters:

color (str/int/tuple/list) – color to write, hex string starts with “#”, 24-bit int or tuple of (red, green, blue)