风扇

../../../../_images/%E7%94%B5%E6%9C%BA%E9%A3%8E%E6%89%87.png

概述

300直流电机,结合风扇叶,组合成风扇。

技术参数

工作电压: VCC 3.3V -5V

转速:15000rpm

轴径:2mm

引脚定义

引脚

定义

黑(GND)

负极

红(VCC)

正极

示例程序

A按键按下,打开电机风扇;B按键按下,则关闭。

from mpython import *

from mpython import ledong_shield

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

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/%E7%94%B5%E6%9C%BA%E9%A3%8E%E6%89%871.png