Helping another teacher with their brand new Vex IQ (1.0.6) and it does NOT respond to inputs as it should. Sometimes it does, other times it doesn’t, other times it will in a weird order. This is happening on multiple brains. This happens both through Chrome and through the separate VEXCode IQ.
results in the robot sometimes moving, but certainly not when it’s supposed to.
I put together a few other simple sensor input related programs, and they too do not function as they should. Is there a common problem that we don’t know about? Anyone else experiencing this?
Did a bunch of trouble shooting (lost my whole night). These brand new optical sensors can’t see the colour green. Or yellow. Or orange.
They can see blue and red. The intermittent control was because “sometimes” and very briefly the sensor will see those colours (sometimes when they aren’t even displayed).
Again, this is multiple brand new kits. So frustrating. Vex, seriously.
Below is a link to documentation on the color sensor. You may want to look at using hue or displaying the hue value when testing different colors in different lighting conditions.
I’m out guessing here, I’ll assume you are looking for disc colors. 26 degrees in the hue measurement seems to be the sweet spot for them. Your exact number will depend on the lighting in your build space and the space(s) you compete in. You will be served by writing test code to look at the object and return the best hue value for it and then use that for the competitions.
I have just tested this against the document linked above. In that activity, the suggestion is to use red and green as the two colours so lets ignore yellow and orange for now.
In my test, setting the touch LED to red is detected by the optical sensor as red every time. Green however is usually detected as cyan. By moving the optical sensor slightly closer to the Touch LED, I was able to get the green LED to be detected as green by the optical sensor.
It is also important to understand what is going on behind the scenes. As @Hudsonville_Robotics says, hue is often better to use than colour names. This is because not all reds, or all greens are equal. There are loads of different shades of every colour.
The colour names in VEXcode are an upper and lower threshold of a hue value and are tuned to specific reds, greens and blues etc. I don’t know for sure, but my guess would be that these are fairly closely tuned to the colours of the VEX IQ plastic parts.
So my guess is that your optical sensor can see all these colours, it is just not possible for every shade of these colours to be interpreted using the colour names. If you use hue values instead, you can tune your sensor to be far more accurate.
The optical sensor detects levels of red, green and blue light. These values are converted into hue in the range 0 to 360 degrees. Using the value of hue we make our best guess as to the color the sensor is detecting by dividing into 10 bands as follows.
The green, blue and red bands were chosen to give similar results to the legacy IQ color sensor and also correctly detect VEX game object color.
Unfortunately the touchled has some variability in the color it produces and is also fairly dim (which makes calculation of hue more prone to error). I looked at three I had here, one is correctly detected as green (hue was 130) the other two are outside of the green band with a hue closer to 150.
Excellent and informative response. Thank you everyone.
Might I suggest that Vex change their instructions then? For a classroom full of Vex IQ and 4th graders, following the instructions exactly as made by the company that makes all the components, to not work as specified seems like a major issue.