Sumobot program vex iq 1st gen

My students are trying to program their VEX IQ’s using vexcode to compete in sumobot. The interior circle is white and the outer ring is black. We have tried programming the color sensor to detect white, but there is no black in the options, so we used if then statements such as if color is white motors on, else back and turn. This did not work and our robots essentially did nothing when put in the ring. Any help programming this sumobot challenge would be appreciated.

  • What exactly did they do? And could we please see your code?

  • Try brightness instead of color.

  • Make sure you’re using a forever loop.

  • Try turning on the color sensor’s light.


Thank you so much for your reply.
They did not move at all. When a couple of students tried troubleshooting, the robots would just continuously move without sensing color changes, etc.
This is I think the code some students started with:

You and your students should also note that the forum cannot solve your problems every time you have one, so you have to learn to debug.

You could print what the color sensor senses and if it’s going forward or backing up:

Then You could move the robot around and see what’s going on.

Thanks so much for your suggestions.
We will try those.
We did try troubleshooting, but my time with them is very limited. I am much more familiar with LEGO EV3 which is what I have used without any issues for the past several years. I did bring a few EV3’s with me the next class (from another school) and they worked great, but the LEGO Labview software that I don’t have any problems using is different than the Vexcode software and I am trying to think like VEX when I am in vexcode. I did watch some tutorials in vex; however, being a teacher of several grade levels it is challenging because I teach more than robotics. These students have very little experience programming and I am doing my best.
Thanks again for your help and I will try not to use the forum. :smile:

1 Like

I have no objection to your using the forum; I was just mentioning that ultimately you won’t be able to come to the forums every time you have a problem. In other words, here are my ideas for how you could figure out yourself how to fix it.


Just a note to give credit to my students. Without any programming experience, they programmed their robots to complete a drive in a square challenge and the warehouse challenge, as well as programming sensors to complete challenges (distance sensor to complete a maze, touch sensor to touch all four walls in a square, and the color sensor for the red light challenge). This was the first time we had issues that they could not solve.
Thank you again for your help. :smile:


Yep, great job to your students! I always like to see people try programming!

1 Like