Competition Switch
R2026bRead switch positions of VEXnet Competition Switch and provide logical values for Autonomous and Driver modes
Libraries:
Simulink Coder Support Package for ARM Cortex-based VEX Microcontroller /
Gamepad
Description
Add-On Required: This feature requires the Simulink Coder Support Package for ARM Cortex-based VEX Microcontroller add-on.
The Competition Switch block reads the switch positions of the VEXnet Competition Switch and provides the corresponding logical values (1 or 0) for the Autonomous mode and Driver mode. This block can be used to switch between the logic required for Driver mode and Autonomous mode, based on the switch position.
Ports
Input
Output
Parameters
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"vexarmcortexlib/Gamepad/Competition Switch"
Example: add_block("vexarmcortexlib/Gamepad/Competition Switch","myModel/myBlock",MakeNameUnique="on")
Version History
Introduced in R2016a