com.qualcomm.robotcore.hardware

## Interface LightSensor

- All Superinterfaces:
    HardwareDevice
  All Known Subinterfaces:
    OpticalDistanceSensor

      public interface LightSensor
      extends HardwareDevice

  Light Sensor

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.qualcomm.robotcore.hardware.HardwareDevice

      `HardwareDevice.Manufacturer`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `enableLed(boolean enable)` Enable the LED light
    `double` | `getLightDetected()` Get the amount of light detected by the sensor, scaled and cliped to a range which is a pragmatically useful sensitivity.
    `double` | `getRawLightDetected()` Returns a signal whose strength is proportional to the intensity of the light measured.
    `double` | `getRawLightDetectedMax()` Returns the maximum value that can be returned by `getRawLightDetected()`.
    `java.lang.String` | `status()` Status of this sensor, in string form

    - ### Methods inherited from interface com.qualcomm.robotcore.hardware.HardwareDevice

      `close, getConnectionInfo, getDeviceName, getManufacturer, getVersion, resetDeviceConfigurationForOpMode`

- - ### Method Detail

    - #### getLightDetected

          double getLightDetected()

      Get the amount of light detected by the sensor, scaled and cliped to a range which is a pragmatically useful sensitivity. Note that returned values INCREASE as the light energy INCREASES.
      Returns:
        amount of light, on a scale of 0.0 to 1.0

    - #### getRawLightDetected

          double getRawLightDetected()

      Returns a signal whose strength is proportional to the intensity of the light measured. Note that returned values INCREASE as the light energy INCREASES. The units in which this signal is returned are unspecified.
      Returns:
        a value proportional to the amount of light detected, in unspecified units

    - #### getRawLightDetectedMax

          double getRawLightDetectedMax()

      Returns the maximum value that can be returned by `getRawLightDetected()`.
      Returns:
        the maximum value that can be returned by getRawLightDetected
      See Also:
        `getRawLightDetected()`

    - #### enableLed

          void enableLed(boolean enable)

      Enable the LED light
      Parameters:
        `enable` - true to enable; false to disable

    - #### status

          java.lang.String status()

      Status of this sensor, in string form
      Returns:
        status