Conditional loop based on color sensor in MODKIT for VEXIQ

Hi there,

I’ve been experimenting with Modkit to teach my students (UK primary schools Y5-6). I’ve been trying to make a conditional loop based on the reading of the color sensor, but can’t seem to find a way to do this. I’m basically looking for a way to say:
While (colourReadOut is Green)
move forward

Is this possible in Modkit? I can’t seem to use the color sensor readout for anything else than changing the touch led color.




Yes, this is definitely possible in Modkit. When you drop the “bowtie” purple color sensor block into a green equals block, the right side changes to a drop down menu to select which color you want to compare it to.

I have created a sample program for you that continuously reads what the Color Sensor is seeing, then writes a different message to the Robot Brain LCD Screen depending on what color it sees:

In the coming weeks we expect to unveil a lot more Color Sensor functionality in Modkit, including greyscale (white/grey/black) mode and more colors (there will be twelve colors).


  • Art

Thanks Art. I was staring myself blind on the shape of the color block. It didn’t seem fit inside the logical blocks. Guess I should have just tried it. Thanks again.