Motor Controller 55#
Introduction#
The Motor Controller 55 (MC55) is used to control standard DC motors.

This page uses mc_55 as the example Motor Controller 55 name. Replace it with your own configured name as needed.
Below is a list of available methods:
spin– Spins a DC motor forward or reverse until stopped.stop– Stops the DC motor immediately.set_velocity– Sets the DC motor’s spin speed as a percentage.set_stopping– Sets how the DC motor behaves when stopping.set_max_torque– Limits the maximum torque the DC motor can apply.set_reversed– Sets the DC motor to have its direction be reversed.current– Returns the current drawn by the DC motor.temperature– Returns the current temperature of the DC motor.
Constructor – Manually initialize a Motor Controller 55.
Motor55– Creates a Motor Controller 55.
spin#
spin rotates a connected DC motor in a specified direction using the current motor velocity.
Usage:
mc_55.spin(direction, velocity, units)
Parameters |
Description |
|---|---|
|
The direction in which to spin the motor:
|
|
Optional. The velocity at which the motor will spin as a float or integer. If the velocity is not specified or previously set, the default velocity is 50%. |
|
Optional. The unit that represents the velocity:
|
# Spin the motor at -2 volts
mc_55.spin(FORWARD, -2)
stop#
stop stops the connected DC motor immediately, using the current stopping mode.
Usage:
mc_55.stop(mode)
Parameter |
Description |
|---|---|
mode |
Optional. The stopping behavior to use when the motor stops:
If the stopping mode is not specified or previously set, the default behavior is |
set_velocity#
set_velocity sets the default spinning speed of a DC motor as a percent for all subsequent Motor Controller 55 methods in the project.
Usage:
mc_55.set_velocity(value, units)
Parameter |
Description |
|---|---|
|
The velocity to set for the DC Motor from 0 to 100. |
|
Optional. The unit that represents the velocity:
|
set_stopping#
set_stopping sets how a DC motor behaves when it stops.
Usage:
mc_55.set_stopping(mode)
Parameters |
Description |
|---|---|
|
How the motor will stop:
|
set_max_torque#
set_max_torque sets how much force a DC motor can exert.
Usage:
mc_55.set_max_torque(value, units)
Parameters |
Description |
|---|---|
|
The new maximum torque for a motor as a float or integer. |
|
Optional. The unit that represents the torque:
|
set_reversed#
set_reversed sets the DC motor to be reversed so that the FORWARD direction will spin clockwise. This method works the same as setting the reverse parameter to True when constructing a Motor55.
Usage:
mc_55.set_reversed(value)
Parameters |
Description |
|---|---|
|
Boolean value to set the direction reversed or not:
|
current#
current returns the amount of electrical current the DC Motor in a range from 0.0 to 1.2 amps (amperes).
Usage:
mc_55.current(units)
Parameters |
Description |
|---|---|
|
Optional. The unit that represents the current:
|
temperature#
temperature returns the current temperature of the DC Motor.
Usage:
mc_55.temperature(units)
Parameters |
Description |
|---|---|
|
Optional. The units that represent the temperature:
|
Constructors#
Constructors are used to manually create Motor55 objects, which are necessary for configuring a Motor Controller 55 outside of VEXcode.
Motor55#
Motor55 creates a Motor Controller 55.
Usage:
Motor55(port, gears, reverse)
Parameter |
Description |
|---|---|
|
The 3-Wire Port that the V5 Pneumatic Solenoid is connected to:
|
|
Optional. Sets whether the motor’s spin should be reversed.
|
# Create a Motor Controller 55 in Port A
mc_55 = Motor55(brain.three_wire_port.a)