RGB Unit
For compatible firmware and host interfaces, see Board Capabilities.
以下产品受支持:
MicroPython 应用示例
import M5
from M5 import *
from unit import RGBUnit
M5.begin()
rgb_0 = RGBUnit((36, 26), 3)
Widgets.fillScreen(0x222222)
rgb_0.set_brightness(80)
rgb_0.fill_color(0xff0000)
rgb_0.set_color(0, 0x33ff33)
UiFlow2 应用示例
class RGBUnit
Constructors
- class RGBUnit(port, number)
Create an RGBUnit object.
- 参数为:
port是该端口的引脚编号number是 RGB 灯珠的数量
UiFlow2





