满天星灯带

../../../../_images/%E4%B9%90%E5%8A%A8%E6%A8%A1%E5%9D%97-%E6%BB%A1%E5%A4%A9%E6%98%9F%E7%81%AF%E5%B8%A6.png

概述

彩色满天星LED彩灯,高电平亮。

技术参数

工作电压: VCC 3.3V -5V

长:2.0米

LED灯:5色,20颗

引脚定义

引脚

定义

黑(GND)

负极

红(VCC)

正极

示例程序

A按键按下,打开满天星灯带;B按键按下,则关闭。

from mpython import *

from mpython import ledong_shield

def on_button_a_pressed(_):
    ledong_shield.set_motor(1, -50)

button_a.event_pressed = on_button_a_pressed

def on_button_b_pressed(_):
    ledong_shield.set_motor(1, 0)

button_b.event_pressed = on_button_b_pressed
../../../../_images/%E6%BB%A1%E5%A4%A9%E6%98%9F%E7%81%AF%E5%B8%A6.png