Class HiTechnicColorSensor

    • Constructor Detail

      • HiTechnicColorSensor

        public HiTechnicColorSensor​(I2CPort port)
      • HiTechnicColorSensor

        public HiTechnicColorSensor​(Port port)
    • Method Detail

      • init

        protected void init()
      • getColorID

        public int getColorID()
        Returns the color index detected by the sensor.
        Specified by:
        getColorID in interface ColorIdentifier
        Returns:
        Color index.
      • 0 = red
      • 1 = green
      • 2 = blue
      • 3 = yellow
      • 4 = magenta
      • 5 = orange
      • 6 = white
      • 7 = black
      • 8 = pink
      • 9 = gray
      • 10 = light gray
      • 11 = dark gray
      • 12 = cyan
      • getColorIDMode

        public SensorMode getColorIDMode()
        HiTechnic color sensor, Color ID mode
        Measures the color ID of a surface.

        Size and content of the sample
        The sample contains one element containing a color ID.

      • 0 = red
      • 1 = green
      • 2 = blue
      • 3 = yellow
      • 4 = magenta
      • 5 = orange
      • 6 = white
      • 7 = black
      • 8 = pink
      • 9 = gray
      • 10 = light gray
      • 11 = dark gray
      • 12 = cyan