I am using the Ev3 + ColorSensor + USB Connection and Control Center to debug. Now I was experimenting with the different colors of the sensors led (any docu somewhere which colors are possible? Full rgb?). I used setFloodlight fron eV3ColorSensor to change colors. This one only works with (well thats in the source code) blue white and red. But when I want to switch the sensor back off I used setFloodlight (boolean) with false. Crashed. This methode calles the other setFloodlight with Color.none but that's not supported (at least I think so):

Hmm,I'm not sure if this a bug or not. If I remember correctly there is no mode for the color sensor that has the light turned off. The only possibility is probably to reset it, but I have a feeling if you do that it will flash red. If I get chance I'll take a look at it but at the moment I'm pretty busy with some motor control stuff. Arguably it does not make sense to support the floodlight method if you can't actually turn it off...

The preferred way to enable or disable the floodlight is to use the different modes and not to use the setFloodLight method directly.

The Method getAmbientMode returns a SampleProvider that utilises the sensor without its LEDs on, the method getRedMode returns a sample provider that utilises the sensor with a red floodlight on. As far as I know it is not possible to turn other LEDs on. Not even sure if the sensor has them.

Each of the SampleProviders/Modes makes sure that the sensor is properly configured for the mode before taking a measurement. if not it will configure the sensor first. This means that a fetchSample call to the AmbientMode SampleProvider always results in the floodlight being off. The RedMode SampleProvider will switch the floodlight on if needed. The good thing is that you do not have to bother with configuring the sensor, you just use the mode you want to. if you mix modes in a program you have to be aware that switching from one mode to another takes some time. In case of the color sensor this is 250 msec.

All sensors that support different modes now work this way. For each mode there is a different SampleProvider. You do not have to switch from one mode to another, this is done implicitly.

Ok, after some playing around I get good results now with my robot (key was to have the sensor as near to the floor and as vertical as possible).Standard mode seems to be rgb (at least thats what I get using getColorID()).

Anyways... I am trying to build a line following robot and I only got one color sensor (standard kit). If I dont want him to go from one side of the line to the other (like a drunk) I need to find the edge of the line and therefore need an excact value of the sensor. Is that possible with this sensor? How do I do that? As far as I have seen there is no method for that in the code?!

And sorry for all these questions guys, but I am having fun with this, so I really wanna learn more about it. If I could help with the code I'd do it (although I am no pro, and I am new to that project).

I stand corrected.The ambient mode of the EV3 color sensor has the blue LED on. There is no way to get the LED light off with this sensor. Also not with the modes that are not implemented: REF-RAW and COL-CAL.

Using following code on 0.5.0-alpha I can read a color and turn off the floodlight again. Repeating the code correctly re-initializes the sensor. Note that this did not work for port 1 (red flashing light).

When you say you get a red flashing light, can you be clear when you get the flashing light? If you simply use the sensor in color id mode do you get this flashing light or does the sensor work correctly. If you get the flashing light in this simple mode then please try the same thing on the same port using the Lego software and report back.