1

I'm following a line with the LEGO EV3 Color Sensor in Reflected-light mode, I need to stop the robot when it detects a green tile in the ground, but I didn't succeeded in differentiating Green and Black, can I access the RGB values of the sensor, or in some way differentiate those colors?

1
  • Please aim to be as descriptive as possible in your question title to get the best possible answers. I've changed the title to what I believe is the subject of your answer, if this isn't the case, please feel free to improve it.
    – Ambo100
    Apr 17, 2016 at 14:53

2 Answers 2

2

Green does tend to be tricky on the LEGO EV3 Color sensor. Example

Here are some suggestions:

  • Build a shroud to eliminate ambient light. I have seen people use electrical tape for this or build something from LEGO parts.
  • Using the raw RGB values, convert to HSV (there is a link in Example 1 for this).
  • Use the algorithm for the NXT color sensor from the EV3 source code. It will probably have to be adjusted a bit for differences in the sensors.
0

Yes try this. Color RGB This is the Color RGB sensor block. Installation instruction can refer from here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.