EV3 DC Motor¶
Note
This class is specifically for on EV3. For Powered Up DC Motors, just use
the DCMotor
class.

-
class
DCMotor
(port, positive_direction=Direction.CLOCKWISE) Generic class to control simple motors without rotation sensors, such as train motors.
- Parameters
-
dc
(duty) Rotates the motor at a given duty cycle (also known as “power”).
- Parameters
duty (percentage: %) – The duty cycle (-100.0 to 100).
-
stop
() Stops the motor and lets it spin freely.
The motor gradually stops due to friction.