Home→Forums→MonoBrick EV3 Firmware→Can the color sensor detect orange?→Reply To: Can the color sensor detect orange?
November 19, 2014 at 09:23
#4982
Jacek S
Participant
Hi,
I need RGB values to convert to HSV. This is the way that colors can be determined easily.
I have made modification to the firmware, and it is working for me. Now I can easily detect orange and other colors.
I added support for uart.mode4 to EV3ColorSensor.cs:
public RGBColor ReadRGB()
{
if (uartMode != UARTMode.Mode4) Mode = ColorMode.RGB;
byte[] rawBytes = ReadBytes(6);
return new RGBColor(rawBytes[0], rawBytes[2], rawBytes[4]);
}
Follow