Configuring the V5 Vision Sensor with the Expert Robot Configuration in VEXcode Pro V5

Open a Project

Enable Expert Robot Configuration

Accept Terms of Expert Robot Configuration

Include New File

Right click on the ‘include’ dropdown and select “New File.”

Add Vision Sensor Configuration File

Select the ‘Vision Sensor Configuration(.h)’ C++ file.

Assign the Vision Sensor to a port.

Name the file [name of file].h

Click the Create button.

NOTE: The file name MUST contain the correct extension of “.h”, the file cannot be created without it.

Launch the Vision Utility

Click on the newly created Vision Sensor File to open the file.

Click on the Configure button to launch the vision utility.

Place an Object in View

Place an object in front of the Vision sensor so that it takes up most of the screen and click on the 'Freeze' button to lock the screen.

Select the Object's Color

Click and drag a bounding box on the color/object to be tracked. Make sure to have the bounding box contain mainly the color of the object and not little to none of the background.

Assign the Color

Click on one of the seven 'Set' checkboxes to assign that color to a signature slot.

Calibrate the Color Signature

Click on the double-sided arrow icon to the right of the 'Clear' button and use the slider to calibrate the Vision Sensor to best detect the color signature. For best results, drag the slider until most of the colored object is highlighted while the background and other objects are not.

Name the Signature

Click on the SIG_1 text field in order to rename the color signature.

Press the Freeze button once more to allow the Vision Sensor to resume tracking. Move the colored object within the field of view of the Vision Sensor to ensure that it is being tracked. If the tracking is working as intended, close out of the Vision Utility.

The color signatures can also be changed in the text editor via the Vision Sensor Configuration file.

To configure the Vision Sensor to detect more colors, repeat steps 5-9.

NOTE: The Vision Sensor is sensitive to different levels of light. The color signatures might need to be re-calibrated if the levels of light in the robot's environment change.

Open main.cpp

Click main.ccp to open the file.

Modify main.cpp

Type out
#include "[name of Vision Sensor file].h".

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

Last Updated: