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

Inherits vex.Device.

Public Member Functions

def __init__ (self, controllerType=ControllerType.PRIMARY)
 Use the controller class to get values from the remote controller as well as write to the controller's screen. More...
 
def rumble (self, rumblePattern)
 Rumbles the controller by a patteren defined by the parameter. More...
 
def set_deadband (self, deadband, percentUnits=PercentUnits.PCT)
 set the value of the controller axis deadband (minimum absolute threshold at which position is reported as non-zero) More...
 
def deadband (self, percentUnits=PercentUnits.PCT)
 get the value of the controller axis deadband More...
 
def type (self)
 Get the device type. More...
 
def installed (self)
 Gets the status of what is installed. More...
 
def value (self)
 

Public Attributes

 buttonL1
 L1 button on the controller. More...
 
 buttonL2
 The "L2" button on the controller. More...
 
 buttonR1
 The "R1" button on the controller. More...
 
 buttonR2
 The "R2" button on the controller. More...
 
 buttonUp
 The "Up" button on the controller. More...
 
 buttonDown
 The "Down" button on the controller. More...
 
 buttonLeft
 The "Left" button on the controller. More...
 
 buttonRight
 The "Right" button on the controller. More...
 
 buttonX
 The "X" button on the controller. More...
 
 buttonB
 The "B" button on the controller. More...
 
 buttonY
 The "Y" button on the controller. More...
 
 buttonA
 The "A" button on the controller. More...
 
 axis1
 Axis 1 on the controller. More...
 
 axis2
 Axis 2 on the controller. More...
 
 axis3
 Axis 3 on the controller. More...
 
 axis4
 Axis 4 on the controller. More...
 
 screen
 Controller's instance of LCD @type vex.ControllerLcd. More...
 

Constructor & Destructor Documentation

◆ __init__()

def vex.Controller.__init__ (   self,
  controllerType = ControllerType.PRIMARY 
)

Use the controller class to get values from the remote controller as well as write to the controller's screen.

Reimplemented from vex.Device.

Member Function Documentation

◆ rumble()

def vex.Controller.rumble (   self,
  rumblePattern 
)

Rumbles the controller by a patteren defined by the parameter.

Dots equal short while dashes equal long.

Parameters
rumblePatternA string that consists of dots and dashes that represent the rumble patteren.

◆ set_deadband()

def vex.Controller.set_deadband (   self,
  deadband,
  percentUnits = PercentUnits.PCT 
)

set the value of the controller axis deadband (minimum absolute threshold at which position is reported as non-zero)

◆ deadband()

def vex.Controller.deadband (   self,
  percentUnits = PercentUnits.PCT 
)

get the value of the controller axis deadband

◆ 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

Member Data Documentation

◆ buttonL1

vex.Controller.buttonL1

L1 button on the controller.

@type vex.ControllerButton

◆ buttonL2

vex.Controller.buttonL2

The "L2" button on the controller.

@type vex.ControllerButton

◆ buttonR1

vex.Controller.buttonR1

The "R1" button on the controller.

@type vex.ControllerButton

◆ buttonR2

vex.Controller.buttonR2

The "R2" button on the controller.

@type vex.ControllerButton

◆ buttonUp

vex.Controller.buttonUp

The "Up" button on the controller.

@type vex.ControllerButton

◆ buttonDown

vex.Controller.buttonDown

The "Down" button on the controller.

@type vex.ControllerButton

◆ buttonLeft

vex.Controller.buttonLeft

The "Left" button on the controller.

@type vex.ControllerButton

◆ buttonRight

vex.Controller.buttonRight

The "Right" button on the controller.

@type vex.ControllerButton

◆ buttonX

vex.Controller.buttonX

The "X" button on the controller.

@type vex.ControllerButton

◆ buttonB

vex.Controller.buttonB

The "B" button on the controller.

@type vex.ControllerButton

◆ buttonY

vex.Controller.buttonY

The "Y" button on the controller.

@type vex.ControllerButton

◆ buttonA

vex.Controller.buttonA

The "A" button on the controller.

@type vex.ControllerButton

◆ axis1

vex.Controller.axis1

Axis 1 on the controller.

@type vex.ControllerAxis

◆ axis2

vex.Controller.axis2

Axis 2 on the controller.

@type vex.ControllerAxis

◆ axis3

vex.Controller.axis3

Axis 3 on the controller.

@type vex.ControllerAxis

◆ axis4

vex.Controller.axis4

Axis 4 on the controller.

@type vex.ControllerAxis

◆ screen

vex.Controller.screen

Controller's instance of LCD @type vex.ControllerLcd.