upm
0.5.1
Sensor/Actuator repository for libmraa (v0.9.1)
|
API for the Grove Light Sensor. More...
The Grove 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 greater in bright light and smaller in the dark. An approximate lux value can also be returned.
Public Member Functions | |
GroveLight (unsigned int pin) | |
~GroveLight () | |
float | raw_value () |
int | value () |
Public Member Functions inherited from Grove | |
std::string | name () |
Additional Inherited Members | |
Protected Attributes inherited from Grove | |
std::string | m_name |
GroveLight | ( | unsigned int | pin | ) |
Grove analog light sensor constructor
pin | Analog pin to use |
~GroveLight | ( | ) |
GroveLight destructor
float raw_value | ( | ) |
Gets the raw value from the AIO pin
int value | ( | ) |
Gets an approximate light value, in lux, from the sensor