VEX V5 Python API
Public Member Functions | List of all members
vex.Motor29 Class Reference

Inherits vex.Device.

Public Member Functions

def __init__ (self, triport_port, reverse=False)
 Use this class when programming a motor connected to a motor controller 29. More...
 
def set_velocity (self, velocity, percentUnits=PercentUnits.PCT)
 Sets the velocity of the motor based on the parameters set in the command. More...
 
def set_reversed (self, is_reversed)
 Use this function to reverse setting for the motor. More...
 
def spin (self, direction, velocity=None, velocityUnits=VelocityUnits.PCT)
 Turns on the motor and spins it in a specified direction and a specified velocity. More...
 
def stop (self)
 Stops the motor using the default brake mode. More...
 
def type (self)
 Get the device type. More...
 
def installed (self)
 Gets the status of what is installed. More...
 
def value (self)
 

Constructor & Destructor Documentation

◆ __init__()

def vex.Motor29.__init__ (   self,
  triport_port,
  reverse = False 
)

Use this class when programming a motor connected to a motor controller 29.

Member Function Documentation

◆ set_velocity()

def vex.Motor29.set_velocity (   self,
  velocity,
  percentUnits = PercentUnits.PCT 
)

Sets the velocity of the motor based on the parameters set in the command.

This command will not run the motor. Any subsequent call that does not contain a specified motor velocity will use this value.

Parameters
velocitySet the amount of velocity that the motor should use.
percentUnitsSet what the motor should treat the previous velocity value as.

◆ set_reversed()

def vex.Motor29.set_reversed (   self,
  is_reversed 
)

Use this function to reverse setting for the motor.

Parameters
is_reversedIf set to true, the motor will spin in the reversed direction.

◆ spin()

def vex.Motor29.spin (   self,
  direction,
  velocity = None,
  velocityUnits = VelocityUnits.PCT 
)

Turns on the motor and spins it in a specified direction and a specified velocity.

Parameters
directionSpin the motor forward by passing FWD, or spin the motor backward by passing REV.
velocitySet the amount of velocity that the motor should use.
velocityUnitsSet what the motor should treat the previous velocity value as.

◆ stop()

def vex.Motor29.stop (   self)

Stops the motor using the default brake mode.

◆ type()

def vex.Device.type (   self)
inherited

Get the device type.

Returns
V5DeviceType enum value

◆ installed()

def vex.Device.installed (   self)
inherited

Gets the status of what is installed.

Returns
Returns a true Boolean if the triport is installed. Returns a false Boolean if the triport is not installed.

◆ value()

def vex.Device.value (   self)
inherited