API for Si1132 UV and Visible Light Sensor.
More...
The Silicon Labs Si1132 is a low-power, ultraviolet (UV) index, and ambient light sensor with I2C digital interface and programmable-event interrupt output.
while (true) {
float value = lightSensor.getVisibleLux();
std::cout << "Light level = " << value << " lux" << std::endl;
upm_delay(1);
}
Instanciates a Si1132 object
- Parameters
-
Si1132 object destructor, basicaly it close i2c connection.
uint16_t getVisibleRaw |
( |
| ) |
|
Read the raw visible light value
virtual const char* getModuleName |
( |
| ) |
|
|
inlinevirtual |
Returns name of module. This is the string in library name after libupm_
- Returns
- name of module
Implements IModuleStatus.
The documentation for this class was generated from the following files: