.. currentmodule:: ev3dev2.motor
Most methods which run motors will accept a speed argument. While this can
be provided as an integer which will be interpreted as a percentage of max
speed, you can also specify an instance of any of the following classes, each
of which represents a different unit system:
.. autoclass:: SpeedValue
.. autoclass:: SpeedPercent
.. autoclass:: SpeedNativeUnits
.. autoclass:: SpeedRPS
.. autoclass:: SpeedRPM
.. autoclass:: SpeedDPS
.. autoclass:: SpeedDPM
Example:
from ev3dev2.motor import SpeedRPM
# later...
# rotates the motor at 200 RPM (rotations-per-minute) for five seconds.
my_motor.on_for_seconds(SpeedRPM(200), 5).. autoclass:: Motor
:members:
:show-inheritance:
.. autoclass:: LargeMotor
:members:
:show-inheritance:
.. autoclass:: MediumMotor
:members:
:show-inheritance:
.. autoclass:: DcMotor
:members:
:show-inheritance:
.. autoclass:: ServoMotor
:members:
:show-inheritance:
.. autoclass:: ActuonixL1250Motor
:members:
:show-inheritance:
.. autoclass:: ActuonixL12100Motor
:members:
:show-inheritance:
.. autoclass:: MotorSet
:members:
.. autoclass:: MoveTank
:members:
:show-inheritance:
.. autoclass:: MoveSteering
:members:
:show-inheritance:
.. autoclass:: MoveJoystick
:members:
:show-inheritance:
.. autoclass:: MoveDifferential
:members:
:show-inheritance: