Bronky/vex.py¶
Used by autodoc_mock_imports.
-
class
vex.Motor(self, Port#)[source]¶ Takes the port number of the Motor as Parameter.
-
run_raw(self, power_raw)¶ Run at given raw power.
Parameters: -127.0…127.0 (raw power).
-
-
class
vex.Joystick[source]¶ Config VexNet joystick
-
is_partner(self) → bool¶ True if this is a partner joystick, false if it is main joystick.
-
set_deadband(self, value)¶ Set the deadband value for all axes (threshold below which axes would read out zero)
Parameters: value deadband threshold
-
axis1(self) → Returns number [-100...100]¶ Position on axis 1: -100.0 to 100.0.
-
axis2(self) → Returns number [-100...100]¶ Position on axis 2: -100.0 to 100.0.
-
axis3(self) → Returns number [-100...100]¶ Position on axis 3: -100.0 to 100.0.
-
axis4(self) → Returns number [-100...100]¶ Position on axis 4: -100.0 to 100.0.
-
accelX(self) → bool¶ Accelerometer axis X: -100.0 to 100.0.
-
accelY(self) → bool¶ Accelerometer axis Y: -100.0 to 100.0.
-
b5up(self) → bool¶ Button 5 pressed UP: True/False.
-
b5down(self) → bool¶ Button 5 pressed DOWN: True/False.
-
b6up(self) → bool¶ Button 6 pressed UP: True/False.
-
b6down(self) → bool¶ Button 6 pressed DOWN: True/False.
-
b7up(self) → bool¶ Button 7 pressed UP: True/False.
-
b7down(self) → bool¶ Button 7 pressed DOWN: True/False.
-
b7left(self) → bool¶ Button 7 pressed LEFT: True/False.
-
b7right(self) → bool¶ Button 7 pressed RIGHT: True/False.
-
b8up(self) → bool¶ Button 8 pressed UP: True/False.
-
b8down(self) → bool¶ Button 8 pressed DOWN: True/False.
-
b8left(self) → bool¶ Button 8 pressed LEFT: True/False.
-
b8right(self) → bool¶ Button 8 pressed RIGHT: True/False.
-
-
vex.battery_voltage() → number¶ Get main battery voltage, in volts.
-
vex.battery_backup_voltage() → number¶ Get backup battery voltage, in volts.
-
vex.debug_output(debug_output_type)¶ Set debug output type.
debug_output_type: DebugOutput.AUTO|SERIAL|LCD|DISABLED
-
vex.run_driver(function)¶ Run the given function in a separate thread in DRIVER ONLY competition mode.
-
vex.run_autonomous(function)¶ Run the given function in a separate thread in AUTONOMOUS ONLY competition mode.
-
vex.competition_switch() -> enum value (number)¶ Returns state of the competition switch, as one of the constants in CompetitionSwitchState.