Output: DC Motor - 图1

What Is It

The DC motor is a rotary electrical machine powered by the gear box with direct current. It makes a shaft and anything attached on it rotate, e.g. a wheel.

How It Works

The DC motor converts electric signals into mechanical signals. By controlling the signals sent to the motor, we can decide what speed and direction of the motor will be.
The stronger the electric signals are, the faster the motor rotates. When the signals become a negative number, the motor starts rotating in an opposite direction. For example, if the signal powers are 100%, the DC motor will rotate clockwise in a full speed; if the signal powers are -100%, the DC motor will rotate counterclockwise in a full speed.
Note: Only use batteries to charge the motor, not the mainboard.

Real World Analogy

Electrical fan

Codecraft

You can find blocks that control the DC motor in the tab Motion in Codecraft.