Our team is new to using the newer sensors and we don’t know how use the vision sensor or how to program it.
There is a tourtoral in the Vexcode app.
Check out this STEM Lab:
https://education.vex.com/parent-wrapper.php?id=vision-sensor-v5
And these Knowledge Base articles:
https://kb.vex.com/hc/en-us/articles/360035953571-Vision-Sensor-Adjustments-Robot-Config-VEXcode-Pro-V5
API is here (sensor commands & stuff): https://api.vexcode.cloud/v5/html/classvex_1_1vision.html
If you're still confused about the sensor commands
If you are still confused about the sensor commands, add the vision sensor to your list of devices by clicking this button in the upper right corner of the screen (I am assuming you’re using VEXcode v5 pro) and then adding the vision sensor. Then, select
and click “Command Reference” and then “Sensing”. Scroll down to where the vision sensor commands are, near the bottom. If you need help with any of those commands, right-click the command in the code and select “Command Help”.
The vision sensor has many uses, including but not limited to correcting angle in relation to a coloured object and detecting the largest object of a specific colour. This is highly useful for this year’s game, as the vision sensor can help you line up to the green flags above the goals and detect the colour of the balls.
Remember that in order to detect a colour, you must first configure the sensor to sense that specific colour.
Some code examples using the API are:
Vision.takeSnapshot(Vision__SIG_1);
float width = Vision.objects[0].width;
bool exists = Vision.objects[0].exists;
Hope that helps, and good luck!