RGB LED

../../../../_images/RGB_LED.png

Overview

Can achieve 256-level brightness display and 16,777,216 colors of true color display.

Technical Specifications

Operating voltage: VCC 3.3V -5V

Module dimensions: 24*48mm

Mounting: 2 plastic building block compatible through-holes

Control method: RGB components

Pin Definition

Pin

Definition

GND

Ground

VCC

Power

DI

Control signal input

NC

Not connected

Example Code

Light up the LED in red, green, and blue sequence.

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()
../../../../_images/rgb_led.png