upm
1.0.2
Sensor/Actuator repository for libmraa (v1.1.1)
|
API for the Light Sensor. More...
The light sensor detects the intensity of the ambient light. As the light intensity of the environment increases, the resistance of the sensor decreases. This means the raw value from the analog pin is larger in bright light and smaller in the dark. An approximate lux value can also be returned.
Public Member Functions | |
Light (unsigned int pin) | |
~Light () | |
float | raw_value () |
int | value () |
std::string | name () |
Light | ( | unsigned int | pin | ) |
analog light sensor constructor
pin | Analog pin to use |
float raw_value | ( | ) |
Gets the raw value from the AIO pin
int value | ( | ) |
Gets an approximate light value, in lux, from the sensor