Vision Sensor recognizing black mats

A Newbie question. Our team is trying to get the V5 Vision Sensor to tell us when we are, and when we are not on a Black EDR foam mats. For reference, our team was in FIRST LEGO League last year, and we had no problem using LEGO EV3’s light sensor to look for colors, or reflective light. This year we moved to VEX EDR with a V5 and programming in VSC Modkit, and are trying to repeat those same kind of sensor loops with the V5 Vision Sensor. Also, we would love to know how to enter a simple vision command that will look for primary colors like: blue, red, yellow, …

If we setup the signatures SIG_1 for the Black foam mats, SIG_2 for the Blue game disks, SIG_3 for Red game disk, and SIG_4 for White. And, our program {M} text code looks like:

  // our while loop program is here 

When the Vision Sensor is looking at foam mats (SIG_1), or red disk (SIG_3), or white (SIG_4), we get a reading of “1”. The blue disk (SIG_2) gives a reading of “0”. If we change the Snapshots to SIG_2 (blue signature), then the blue disk changes to “1”, and the mats, red disk and white all change to “0”.

Also when we starting working with the Vision Sensor, we only had 2 signatures setup for the black foam mats and white hardboard. No matter how much we played with the double arrow slider to change the sensitivity level, we could not get the sensor to tell the difference between the black mats and white hardboard. It calculated that everything was black.

Any help on this would be greatly appreciated.

Thanks in advance,

I think the reading of 1means that their is that many objects in the frame being detected. Also I would use a Line Tracker this can give you two values black (the tiles are close enough to black) and white.


I have a set of Line Tracker sensors.

I do not see them under the “Robot” setup screen in Modkit. Is their some drivers that I can add to the VCS?

Or, do i need to define it in the header file, and then use a C++ command in {M}Text screen?


Hmm… I see the problem. You could probably fake it out. Tell it there is a potentiometer there, but stick a line tracker in. Ultimately you’re just applying a constant voltage and reading an analog output signal. The brain doesn’t really know the difference as long as it’s not trying to do something like working with sonar or expecting a true/false response.


I attached a line tracker and configured it as a Potentiometer, and then as a Gyro, and finally as an Accelerometer. Interestingly enough, the Line Tracker returned the same values regardless of what it was configured as.

Black foam was 70
Blue hat was 61 to 65
Red hat was 61 to 67
Blue foam was 55
Red foam was 55
White hardboard was 38-43