|
Nol.A SDK Library 26.11.2
For IoT System Software Development
|
VEML6030 ambient and white-light sensor driver. Register reads/writes do not expose transport error status. Configure gain and integration time before setting lux-based interrupt thresholds. More...
#include <SparkFun_VEML6030.hpp>
Public Member Functions | |
| SparkFun_VEML6030 (TwoWire &, uint8_t address) | |
| Bind an initialized I2C bus and the 7-bit sensor address (defAddr or altAddr). | |
| bool | begin () |
| Power on the sensor and probe its address; return true on acknowledgement. Initialize the I2C bus before calling this method. | |
| void | setGain (float gainVal) |
| Set gainVal to 0.125, 0.25, 1, or 2; other values leave the setting unchanged. | |
| float | readGain () |
| Return the gain multiplier, or UNKNOWN_ERROR for an unrecognized setting. | |
| void | setIntegTime (uint16_t time) |
| Set integration time to 25, 50, 100, 200, 400, or 800 milliseconds. | |
| uint16_t | readIntegTime () |
| Return integration time in milliseconds, or UNKNOWN_ERROR for an unrecognized setting. | |
| void | setProtect (uint8_t protVal) |
| Set the persistence count to 1, 2, 4, or 8 threshold-crossing samples. | |
| uint8_t | readProtect () |
| Return the configured persistence count (1, 2, 4, or 8). | |
| void | enableInt () |
| Enable the sensor interrupt output. | |
| void | disableInt () |
| Disable the sensor interrupt output. | |
| uint8_t | readIntSetting () |
| Return the interrupt-enable bit (1 enabled, 0 disabled). | |
| void | shutDown () |
| Enter shutdown while retaining the last measurement registers. | |
| void | powerOn () |
| Leave shutdown and wait 4 milliseconds for startup. | |
| void | enablePowSave () |
| Enable the configured power-saving mode. | |
| void | disablePowSave () |
| Disable power-saving mode. | |
| uint8_t | readPowSavEnabled () |
| Return the power-saving enable bit (1 enabled, 0 disabled). | |
| void | setPowSavMode (uint16_t modeVal) |
| Select power-saving mode 1 through 4, with higher modes sampling less frequently. | |
| uint8_t | readPowSavMode () |
| Return the selected power-saving mode, 1 through 4. | |
| uint8_t | readInterrupt () |
| Return NO_INT, INT_HIGH, or INT_LOW; other register combinations return UNKNOWN_ERROR. | |
| void | setIntLowThresh (uint32_t luxVal) |
| Set the lower interrupt threshold in lux using the current gain/integration settings. | |
| uint32_t | readLowThresh () |
| Return the lower interrupt threshold in lux. | |
| void | setIntHighThresh (uint32_t luxVal) |
| Set the upper interrupt threshold in lux using the current gain/integration settings. | |
| uint32_t | readHighThresh () |
| Return the upper interrupt threshold in lux. | |
| uint32_t | readLight () |
| Return ambient illuminance in integer lux, with high-light compensation above 1000 lux. | |
| uint32_t | readWhiteLight () |
| Return white-channel illuminance in integer lux using the gain/integration conversion. | |
VEML6030 ambient and white-light sensor driver. Register reads/writes do not expose transport error status. Configure gain and integration time before setting lux-based interrupt thresholds.