Fan
Overview
300 DC motor combined with fan blades to form a fan.
Technical Specifications
Operating voltage: VCC 3.3V -5V
Speed: 15000rpm
Shaft diameter: 2mm
Pin Definition
Pin D |
efinition |
|---|---|
Black(GND |
) Negative |
Red(VCC) |
Positive |
Example Code
Press the A button to turn on the motor fan; press the B button to turn it off.
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