Class SumoEyesSensor

    • Constructor Detail

      • SumoEyesSensor

        public SumoEyesSensor​(AnalogPort port)
        Default constructor.
        Parameters:
        port - the sensor port
      • SumoEyesSensor

        public SumoEyesSensor​(Port port)
        Default constructor.
        Parameters:
        port - the sensor port
    • Method Detail

      • getValue

        public int getValue()
        Gets the raw value of the sensor.
        Returns:
        the raw sensor value
      • getObstacle

        public int getObstacle()
        Returns the detected zone (NO_DETECTION (0) , RIGHT (1), CENTER (2), LEFT (3))
        Returns:
        detected zone constant
      • setLongRange

        public void setLongRange​(boolean longRange)
        Enables long range of the sensor.
        Parameters:
        longRange - if true, enables long range, if false enables short range
      • isLongRange

        public boolean isLongRange()
        Returns the current range of the sensor.
        Returns:
        current range of the sensor