VEX EDR Python API
Classes | Functions | Variables
vex Namespace Reference

Vex Cortex controller Python API for Robot Mesh. More...

Classes

class  AnalogSensor
 
class  AngleSensor
 Config Angle sensor. More...
 
class  Bumper
 
class  CompetitionSwitchState
 State of the Competition Switch. More...
 
class  DebugOutputType
 Type of debug output. More...
 
class  DigitalInput
 Config Digital input pin. More...
 
class  DigitalOutput
 Config Digital output pin with on/off state. More...
 
class  Encoder
 Config Encoder: counts ticks. More...
 
class  EncoderMotor
 Config Encoder motor that tracks distance covered. More...
 
class  GyroSensor
 Config Gyro. More...
 
class  Joystick
 Config VexNet joystick More...
 
class  LcdDisplay
 Config LCD Display device for Vex with 2 line display and 3 buttons. More...
 
class  LightSensor
 Config Light intensity sensor. More...
 
class  LimitSwitch
 
class  LineTracker
 Config Line tracker. More...
 
class  Motor
 Config Motor with a power setting. More...
 
class  Serial
 
class  SerialParam
 
class  Servo
 Config Servo motor More...
 
class  UltrasonicSensor
 Config Ultrasonic distance sensor. More...
 

Functions

def battery_voltage ()
 Get main battery voltage, in volts. More...
 
def battery_backup_voltage ()
 Get backup battery voltage, in volts. More...
 
def debug_output (debug_output_type)
 Set debug output type. More...
 
def run_driver (f)
 Run the given function in a separate thread in DRIVER ONLY competition mode. More...
 
def run_autonomous (f)
 Run the given function in a separate thread in AUTONOMOUS ONLY competition mode. More...
 
def competition_switch ()
 Returns state of the competition switch, as one of the constants in CompetitionSwitchState. More...
 

Variables

int UNIT_INCH = 1
 
int UNIT_CM = 2
 
int UNIT_MM = 3
 
int POWER_UNCHANGED_FWD = 255
 
int POWER_UNCHANGED_REV = -255
 

Detailed Description

Vex Cortex controller Python API for Robot Mesh.

Copyright 2013 Robot Mesh

Function Documentation

◆ battery_voltage()

def vex.battery_voltage ( )

Get main battery voltage, in volts.

Returns
number

◆ battery_backup_voltage()

def vex.battery_backup_voltage ( )

Get backup battery voltage, in volts.

Returns
number

◆ debug_output()

def vex.debug_output (   debug_output_type)

Set debug output type.

Parameters
debug_output_typeDebugOutput.AUTO|SERIAL|LCD|DISABLED

◆ run_driver()

def vex.run_driver (   f)

Run the given function in a separate thread in DRIVER ONLY competition mode.

Parameters
fname of the function to run in a new thread

◆ run_autonomous()

def vex.run_autonomous (   f)

Run the given function in a separate thread in AUTONOMOUS ONLY competition mode.

Parameters
fname of the function to run in a new thread

◆ competition_switch()

def vex.competition_switch ( )

Returns state of the competition switch, as one of the constants in CompetitionSwitchState.

Returns
CompetitionSwitchState enum value (number)

Variable Documentation

◆ UNIT_INCH

int vex.UNIT_INCH = 1

◆ UNIT_CM

int vex.UNIT_CM = 2

◆ UNIT_MM

int vex.UNIT_MM = 3

◆ POWER_UNCHANGED_FWD

int vex.POWER_UNCHANGED_FWD = 255

◆ POWER_UNCHANGED_REV

int vex.POWER_UNCHANGED_REV = -255