VEXIQ Line Tracker with Color Sensor

I’m going to attempt to create a line tracker for my students. I’m using VEXcode IQ Blocks for programming. I have a few questions:

  • Is it possible to set the color sensor to be in grayscale mode in VEXcode IQ Blocks? It appears that you can do this in RobotC, but I can’t find it in VEXcode IQ Blocks.

  • Below is program I created. Are there any other folks who have done this? I’m curious to learn other ways to write this same program.

Screenshot (6)

Hmmm. My guess is that you kind of control this yourself using a combination of the Set Colour Light % block under looks and the the Brightness is % block under sensing because you are effectively looking for the amount of reflected light - black will reflect much less.

I haven’t found any way to access the grey scale output of the sensor in VEX IQ Blocks either. Below is my code for line following. It has trouble with turns depending on the angle, but it sort of works, and I wanted to keep it as simple as I could so that the kids could understand it.
I’ve tried every kind of painters tape I could find, and found that green worked the best. It is read to be about hue=180. Yellow was too transparent, and standard blue tape was too similar to every floor I had available.
I also had much better luck when I positioned the sensor an inch or two in front of the front wheels. I initially put it under the center of the wheelbase and I couldn’t get anything to work.

There is line tracking code in the examples under File --> Open Examples. I tried it and it works well.

Screen Shot 2021-01-12 at 1.28.06 PM