Motor 393#
Introduction#
A Motor 393 is a DC motor controlled through a VEX Motor Controller 29 (MC29). The MC29 converts the Pulse Width Modulation (PWM) signal from a 3-wire Brain port into a variable voltage that drives the Motor 393.

This page uses motor_393 as the example Motor 393 name. Replace it with your own configured name as needed.
Below is a list of available methods:
spin– Spins a Motor 393 forward or reverse until stopped.stop– Stops a Motor 393 immediately.set_velocity– Sets a Motor 393’s speed as a percentage.set_reversed– Sets a Motor 393 to have its direction be reversed.
Constructor – Manually initialize a Motor Controller 29.
Motor29– Creates a Motor Controller 29.
spin#
spin rotates a connected Motor 393 in a specified direction using the current motor velocity.
Usage:
motor_393.spin(direction, velocity, units)
Parameters |
Description |
|---|---|
|
The direction in which to spin the Motor 393:
|
|
Optional. The velocity at which the Motor 393 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:
|
stop#
stop stops the connected Motor 393 immediately.
Usage:
motor_393.stop()
Parameters |
Description |
|---|---|
This method has no parameters. |
set_velocity#
set_velocity sets the default spinning speed of a Motor 393 for all subsequent Motor 393 methods in the project.
Usage:
motor_393.set_velocity(value, units)
Parameter |
Description |
|---|---|
|
The velocity at which the Motor 393 will spin as a float or integer. |
|
Optional. The unit that represents the velocity:
|
set_reversed#
set_reversed sets the Motor 393 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 Motor29.
Usage:
motor_393.set_reversed(value)
Parameters |
Description |
|---|---|
|
Boolean value to set the direction reversed or not:
|
Constructors#
Constructors are used to manually create Motor29 objects, which are necessary for configuring a Motor Controller 29/Motor 393 outside of VEXcode.
Motor29#
Motor29 creates a Motor Controller 29.
Usage:
Motor29(port, gears, reverse)
Parameter |
Description |
|---|---|
|
The 3-Wire Port that the V5 Pneumatic Solenoid is connected to:
|
|
Optional. Sets whether the Motor 393’s spin should be reversed.
|
# Create a Motor Controller 29 in Port A
motor_393 = Motor29(brain.three_wire_port.a)