Reply To: Can the color sensor detect orange?

HomeForumsMonoBrick EV3 FirmwareCan the color sensor detect orange?Reply To: Can the color sensor detect orange?

#4982
Author Image
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]);
  }
Posted in

Make a donation