Package lejos.robotics
Interface LightDetector
-
public interface LightDetectorA platform independent implementation for sensors that can detect white light levels.- Author:
- BB modified by RG 11/14
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description floatgetHigh()The highest raw light value this sensor can return from intense bright light.floatgetLightValue()Returns the calibrated and normalized brightness of the white light detected.floatgetLow()The lowest raw light value this sensor can return in pitch black darkness.floatgetNormalizedLightValue()Returns the normalized value of the brightness of the white light detected, such that the lowest value is darkness and the highest value is intense bright light.
-
-
-
Method Detail
-
getLightValue
float getLightValue()
Returns the calibrated and normalized brightness of the white light detected.- Returns:
- A brightness value between 0 and 100%, with 0 = darkness and 100 = intense sunlight
-
getNormalizedLightValue
float getNormalizedLightValue()
Returns the normalized value of the brightness of the white light detected, such that the lowest value is darkness and the highest value is intense bright light.- Returns:
- A raw value, between getLow() and getHigh(). Usually between 0 and 1.00 but can be anything depending on hardware. low values = dark, high values = bright
-
getHigh
float getHigh()
The highest raw light value this sensor can return from intense bright light.- Returns:
- the high value
-
getLow
float getLow()
The lowest raw light value this sensor can return in pitch black darkness.- Returns:
- the low value
-
-