How to use Vision.takeSnapshot()
Step 1: Connect the Vision Sensor
- Ensure that the Vision Sensor is connected to the V5 Robot Brain via Smart cable, and directly connected to the computer via a Micro USB Cable.
Step 2: Configure Color Signature(s)
- Open VEX Coding Studio and configure color signature(s) for the Vision Sensor using the Vision Utility.
Step 3: Coding in VEX Coding Studio
- Add a
Vision1.takeSnapshot(SIG_1)command to your code.
What does Vision.takeSnapshot() do?
vision.takeSnapshot() command is executed, the Vision Sensor takes a snapshot of whatever is in view. The command will then search the snapshot for the color signature that was specified in the parentheses and stores information about the signatures found into an array. The order in which information is stored in the array is based on the overall size of the signature, from largest to smallest. The number of found objects can be shown by using a