RGB LED =================== .. figure:: /_static/products/ledong-module/static/图片/RGB_LED.png :width: 55% :align: center 概述 -------------------- 可实现256级亮度显示,16777216种颜色的全真色彩显示颜色。 技术参数 ------------------- 工作电压: VCC 3.3V -5V 模块尺寸:24*48mm 固定安装:2个兼容塑料积木通孔 控制方式:RGB分量 引脚定义 ------------------- ===== =========== 引脚 定义 ===== =========== GND 地 VCC 电源 DI 控制信号输入 NC 空 ===== =========== 示例程序 ------------------- **依次按照红绿蓝点亮LED灯。** .. code-block:: python from mpython import * import neopixel my_rgb = neopixel.NeoPixel(Pin(Pin.P15), n=1, bpp=3, timing=1) import time while True: my_rgb.fill( (255, 0, 0) ) my_rgb.write() time.sleep(0.5) my_rgb.fill( (0, 255, 0) ) my_rgb.write() time.sleep(0.5) my_rgb.fill( (0, 0, 255) ) my_rgb.write() .. figure:: /_static/products/ledong-module/static/examples/RGB_LED.png :width: 100% :align: center