Configuring Sensors in VEXcode V5

When starting to program with VEXcode V5, Sensor blocks will not appear in the Toolbox until a sensor has been configured.

Adding a Sensor

Diagram illustrating various V5 blocks used in robotics programming, highlighting their functions and connections, as part of the V5 Category Description in the Blocks Tutorials section.

To configure a sensor, select the Devices icon to open the Devices window. 

Diagram illustrating various V5 blocks used in robotics programming, showcasing their connections and functionalities in a tutorial context.

Select “Add a device.”

Diagram illustrating V5 blocks for programming tutorials, showcasing various block types and their connections in a visual format to aid understanding of block-based coding concepts.

Select a sensor.

Note: Sensors include the Rotation Sensor, Distance Sensor, Vision Sensor, Optical Sensor, Inertial Sensor, and GPS Sensor. All sensors follow the same configuration process. For more information about configuring 3-wire devices, view this article

Diagram illustrating the V5 category blocks tutorial, showcasing different block types and their functionalities within the VEX robotics system.

Select which port the sensor is attached to on the VEX V5 Brain. Ports that are already configured for other devices will be unavailable. Once the port has been selected, select “Done” to submit the device to the configuration or “Cancel” to return back to the Devices menu.

Note: Selecting “Cancel” will undo any changes you have made to the device and will not be a part of the configuration.


Changing a Sensor’s Port Number

Diagram illustrating V5 blocks used in robotics, showcasing various components and their connections in a tutorial format.

You can change the port number for the Sensor by selecting on the Sensor in the Devices window.

Diagram illustrating V5 blocks for robotics programming, showcasing various block types and their functions in a tutorial context.

Select a different port on the Port Selection screen and the port number will turn green. Then select Done to submit the change. 


Renaming a Sensor

Diagram illustrating V5 blocks used in robotics tutorials, showcasing various block types and their connections for programming tasks.

You can also rename the sensor by changing the name in the text box at the top of the Port Selection screen. If you select an invalid name, the text box will highlight red to indicate. Then select Done to submit the device changes to the configuration. 

Illustration of V5 blocks tutorial, showcasing various VEX robotics components and their configurations for educational purposes.

If you change the name of a sensor that is already being used in your project, you will need to update the sensor name in the Block to the new name using the drop down.


Deleting a Sensor

Diagram illustrating various blocks used in V5 robotics tutorials, showcasing their functions and connections for educational purposes.

Sensors can also be deleted by selecting the “Delete” option at the bottom of the Port Selection screen.

Note: If you delete a sensor that is already being used in your project, your project will not work until you also delete the blocks that were using the deleted sensor.

For more information, help, and tips, check out the many resources at VEX Professional Development Plus

Last Updated: