Optical Sensor Questions

Hello, we recently ordered two new V5 Optical Sensors and have some questions. We are experimenting with the data from the sensor under the devices menu on the V5 Brain. We have tried testing both of these sensors and get the same results with both of them.

1.) Question regarding data in Color Mode:
Moving a red ball in front of the camera on the Optical Sensor registers as red, but moving a blue ball in front of it registers as orange or neon green in different lighting. We haven’t been able to get it to register as blue. Is this normal, or does the sensor somehow need to be calibrated?

2.) Question regarding Gesture Mode:
On the product description on vexrobotics.com, it says that the Optical sensor is able to recognize the vertical or horizontal motion of the objects in view. This page also shows a picture of the Brain screen in gesture mode and an light blue arrow indicating the direction of object movement. We have been unable to get any arrows to appear, no matter the distance or color of the object in the camera’s view. What do we need to do for this to work?

Thank you for any help or suggestions you can give!

2 Likes

see some of my comments in this topic.

  1. If the returned color does not give you correct results* then use hue directly and make decisions based on that value.

  2. have you tried switching the sensor to gesture mode in the dashboard (touch bluehis color label) and moving your hand in front of it ?

  • the colors returned are simply our estimate of the color based on the hue, for example, we consider a red object as having a range of hues from 340 deg to 20 deg (40 deg range). Different lighting will have an impact on this, a blue object with lighting with a large green component (eg. fluorescent) will end up being biased towards cyan/green and may not read as blue.
7 Likes

Thanks for the quick reply!

1.) We haven’t tried to program it yet, but we will definitely try this once we do. We just wanted to make sure this behavior was normal in the dashboard before we move forward with coding.

2.) Yes, we have selected gesture mode and moving a hand in front of the camera at very close range did not register any motion in any direction.

1 Like

We’ve been working more with our optical sensors and here’s the update…

In regard to detecting hues:

With different lighting, the optical sensor did register blue for a blue ball which we hadn’t been able to do before.

We tried downloading the example VEXcode program for the optical sensor - and it only returns “no object detected”.

Has anyone successfully been able to detect hues through programming or through this sample program?

In regard to detecting gestures:

We tried connecting both sensors to a different brain with a different smart cable, but the same problem still exists of no arrows showing on the dashboard in gesture mode.

We’ve also tried detecting gestures through programming in case they just aren’t displaying on the brain interface for some reason. However, no success here either.

Is anyone seeing arrows indicating the sensor has recognized a gesture on the brain interface when in gesture mode? Or have others gotten the gestures to work through programming?

Thanks for any feedback. We’re trying to determine if these sensors are faulty or if we are just missing something.

1 Like