TLC5971 LED 驱动
组件/Hub
Section titled “组件/Hub”
此组件代表一条 TLC5971 12 通道、16 位 PWM LED 驱动链, 例如用于 Adafruit 的这块板。
要使用此组件的通道,你首先需要设置
全局 tlc5971 hub 并为其指定一个 id,然后定义
单独的输出通道。
# Example configuration entrytlc5971: data_pin: GPIOXX clock_pin: GPIOXX-
data_pin (必需, Pin Schema): 连接到 DIN 的引脚。
-
clock_pin (必需, Pin Schema): 连接到 CLK 的引脚。
-
num_chips (可选, int): 链中的芯片数量。值必须 在 1 到 85 之间。默认为 1。
-
id (可选, ID): 用于 此
tlc5971组件的 id。如果你有多个 TLC5971 链 同时连接,请使用此选项。
tlc5971 输出组件将全局 组件/Hub 的 tlc5971 通道作为浮点输出暴露。
# Individual outputsoutput: - platform: tlc5971 id: output_red channel: 0 - platform: tlc5971 id: output_green channel: 1 - platform: tlc5971 id: output_blue channel: 2-
id (必需, ID): 用于此输出组件的 id。
-
channel (必需, int): 选择此输出组件的 TLC5971 链的通道。
-
tlc5971_id (可选, ID): 手动指定 TLC5971 组件 的 ID。 如果你有多个 TLC5971 链并希望同时使用,请使用此选项。
-
所有其他选项请参见 输出。