Configuring Sensors in VEXcode EXP

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


Adding a Sensor

VEXcode EXP Toolbar with the Devices icon highlighted in between the Code Viewer and the Print Console icons.

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

VEXcode EXP Devices menu with the Add a device button highlighted.

Select “Add a device.”

VEXcode EXP Devices menu after the Add a device button has been selected. All of the sensor options are highlighted.

Select a sensor.

Note: Sensors include the Rotation Sensor, Distance Sensor, Vision Sensor, Optical Sensor, and Inertial Sensor. All sensors follow the same configuration process.

Screenshot of the Select a Port menu that shows the process of selecting Ports for the Distance sensor.

Select which port the sensor is attached to on the VEX EXP 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

VEXcode EXP Devices menu with the previously added Distance sensor highlighted.

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

VEXcode EXP Devices Port Selection menu being used to change already set Port numbers. Selected Ports will show green, and after selecting the new ones the user can press Done to save the changes.

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

VEXcode EXP Devices window with the Distance sensor options shown. Above, the Distance sensor's name is highlighted to indicate that it can be renamed.

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. 

The VEXcode EXP Object size is block is shown with the Distance sensor dropdown menu open. The Distance sensor's new name is shown in the menu, in this example it is named Distance.

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

VEXcode EXP Devices menu with the Distance sensor options shown. Below, the Delete button is highlighted.

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: