Skip to main content

Building Brick Motor

Specifications

ItemSpecifications
SKUEF09087
Environmental conditions for use
Operating voltage3V
Operating temperature-10℃~50℃
Mechanical properties
Mechanical limit angle360°
weight9 ± 1g
Reduction ratio1/266
Gear virtual position≤1°
Control characteristics
Operating Angle360°
Optional directionClockwise
Movable angle range360°
Item3V Test
no-load speed70±5r/min
No-load current70±20mA
Stop torque0.5±0.1 kg-cm
Stop current0.8±0.1A
Standby current7±1mA
No-load life大于 200 小时

Hardware connection

Here we take the wukong expansion board as an example.

Connect the motor to the M1 interface of the expansion board.

Add a dedicated extension library

Click "Advanced" in the code drawer of MakeCode to view more code options.

In order to program the Nezha expansion board, we need to add an extension library. Find "Extension" at the bottom of the code drawer and click it. A dialog box will pop up, search for "Nezha", and then click to download this code library.

Note: If you get a prompt saying that some code libraries will be deleted due to incompatibility, you can continue according to the prompt, or create a new project in the project menu bar.

Write the program as shown

Reference Program

Please refer to the program link: https://makecode.microbit.org/_U3p38hgW2d33

You can also download the program directly from the following website, and start running the program after downloading.

### Result

When button A is pressed, the motor rotates, and when button B is pressed, the motor stops rotating.

Notes

Note: When using the motor, you should pay attention to whether the motor is stuck. If the motor is stuck, there may be a risk of burning.