This article is not viewable in your language. Please check back at a future date.
This article's translation was completed by machine translation. Please forgive any possible errors.
Get more with VEXcode
We recommend you transition to our new software. VEXcode has both block-based and text-based options, that work on Chromebooks, iPads, Android tablets, Windows and Macs. Visit code.vex.com for more details on how to download VEXcode.
VEX Coding studio has been discontinued and is no longer available for download. Already downloaded? The program will continue to function but will no longer be supported.
Users who transition to VEXcode can migrate their C++/C++ Pro projects to VEXcode Pro V5 by following this article.
Step 1: Configure the Vision Sensor
- Open VEX Coding Studio and configure color signature(s) for the Vision Sensor using the Vision Utility.
Step 2: Connect to the V5 Robot Brain
- Disconnect the Micro USB from the Vision Sensor.
- Connect the Vision Sensor to the port on the V5 Robot Brain that it was assigned to in VCS.
Step 3: Ensure vision.takeSnapshot() precedes vision.objects[ ]
Vision.takeSnapshot()command tells the vision sensor to capture and save all of the detected objects information into the
Step 4: Vision.objects[ ]
- Using a
Vision.objectscommand will access the different values related to the color signature objects found and stored in an array after using the
Vision.takeSnapshot()command. The color signatures stored in the array are ordered from the largest sized objects to the smallest.
NOTE: In order to use the
Vision.objects command correctly, an array index number must be between the brackets .
Vision.objects[ ].originX and Vision.objects[ ].originY
Vision.objects.originXreturns the object specified in the square brackets' origin X-axis value. Similarly the
Vision.objects.originYreturns the specified object's origin Y-axis value.
Vision.objects[ ].centerX and Vision.objects[ ].centerY
Vision.objects.centerXreturns the center of the specified object's center X-axis position and
Vision.objects.centerYreturns the center of the specified object's center Y-axis position.
Vision.objects[ ].width and Vision.objects[ ].height
Vision.objects.widthreturns the width of the specified object and
Vision.objects.heightreturns the height of the specified object.
Vision.objects.anglereturns the angle of the specified object in the square brackets.
Vision.objects.angle is only valid for color codes. Normal color signatures will always have an angle value of 0.