Class that stores state and functions for interacting with VEML6075 sensor IC.
More...
#include <Adafruit_VEML6075.h>
|
|
| Adafruit_VEML6075 () |
| | constructor initializes default configuration value
|
| |
| boolean | begin (veml6075_integrationtime_t itime=VEML6075_100MS, bool highDynamic=false, bool forcedReads=false, TwoWire *theWire=&Wire) |
| | setup and initialize communication with the hardware More...
|
| |
| void | shutdown (bool sd) |
| | Shut down the sensor. More...
|
| |
| void | setIntegrationTime (veml6075_integrationtime_t itime) |
| | Set the time over which we sample UV data per read. More...
|
| |
| veml6075_integrationtime_t | getIntegrationTime (void) |
| | Get the time over which we sample UV data per read from the sensor. More...
|
| |
| void | setHighDynamic (bool hd) |
| | Sets whether to take readings in 'high dynamic' mode. More...
|
| |
| bool | getHighDynamic (void) |
| | Gets whether to take readings in 'high dynamic' mode. More...
|
| |
| void | setForcedMode (bool flag) |
| | Sets whether to take readings on request. More...
|
| |
| bool | getForcedMode (void) |
| | Gets whether to take readings on request. More...
|
| |
| void | setCoefficients (float UVA_A, float UVA_B, float UVA_C, float UVA_D, float UVA_response, float UVB_response) |
| | Set the UVI calculation coefficients, see datasheet for some example values. We use the default "no cover glass" values if none are specified when initializing the sensor. More...
|
| |
| float | readUVA (void) |
| | read the calibrated UVA band reading More...
|
| |
| float | readUVB (void) |
| | read the calibrated UVB band reading More...
|
| |
| float | readUVI (void) |
| | Read and calculate the approximate UV Index reading. More...
|
| |
| void | readUVABI (float *a, float *b, float *i) |
| | read the calibrated UVA & UVB band reading and calculate the approximate UV Index reading More...
|
| |
Class that stores state and functions for interacting with VEML6075 sensor IC.
◆ begin()
| boolean Adafruit_VEML6075::begin |
( |
veml6075_integrationtime_t |
itime = VEML6075_100MS, |
|
|
bool |
highDynamic = false, |
|
|
bool |
forcedReads = false, |
|
|
TwoWire * |
theWire = &Wire |
|
) |
| |
setup and initialize communication with the hardware
- Parameters
-
| itime | The integration time to use for the data. Defaults to 100ms |
| forcedReads | True for triggered read, false for continuous (default) |
| highDynamic | Whether to read in normal or high dynamic mode - defaults to normal |
| theWire | Optional pointer to the desired TwoWire I2C object. Defaults to &Wire |
- Returns
- True if sensor found, false if sensor not detected
◆ shutdown()
| void Adafruit_VEML6075::shutdown |
( |
bool |
sd | ) |
|
Shut down the sensor.
- Parameters
-
| sd | True if you want to shut down, false to enable |
◆ setIntegrationTime()
Set the time over which we sample UV data per read.
- Parameters
-
| itime | How many milliseconds to integrate over |
◆ getIntegrationTime()
Get the time over which we sample UV data per read from the sensor.
- Returns
- How many milliseconds to integrate over
◆ setHighDynamic()
| void Adafruit_VEML6075::setHighDynamic |
( |
bool |
hd | ) |
|
Sets whether to take readings in 'high dynamic' mode.
- Parameters
-
| hd | True if you want high dynamic readings, False for normal dynamic |
◆ getHighDynamic()
| bool Adafruit_VEML6075::getHighDynamic |
( |
void |
| ) |
|
Gets whether to take readings in 'high dynamic' mode.
- Returns
- True if set to high dynamic readings, False for normal dynamic
◆ setForcedMode()
| void Adafruit_VEML6075::setForcedMode |
( |
bool |
flag | ) |
|
Sets whether to take readings on request.
- Parameters
-
| flag | True if you want readings on request, False for continuous reads |
◆ getForcedMode()
| bool Adafruit_VEML6075::getForcedMode |
( |
void |
| ) |
|
Gets whether to take readings on request.
- Returns
- True if readings on request, False for continuous reads
◆ setCoefficients()
| void Adafruit_VEML6075::setCoefficients |
( |
float |
UVA_A, |
|
|
float |
UVA_B, |
|
|
float |
UVB_C, |
|
|
float |
UVB_D, |
|
|
float |
UVA_response, |
|
|
float |
UVB_response |
|
) |
| |
Set the UVI calculation coefficients, see datasheet for some example values. We use the default "no cover glass" values if none are specified when initializing the sensor.
- Parameters
-
| UVA_A | the UVA visible coefficient |
| UVA_B | the UVA IR coefficient |
| UVB_C | the UVB visible coefficient |
| UVB_D | the UVB IR coefficient |
| UVA_response | the UVA responsivity |
| UVB_response | the UVB responsivity |
◆ readUVA()
| float Adafruit_VEML6075::readUVA |
( |
void |
| ) |
|
read the calibrated UVA band reading
- Returns
- the UVA reading in unitless counts or NAN if reading failed
◆ readUVB()
| float Adafruit_VEML6075::readUVB |
( |
void |
| ) |
|
read the calibrated UVB band reading
- Returns
- the UVB reading in unitless counts or NAN if reading failed
◆ readUVI()
| float Adafruit_VEML6075::readUVI |
( |
void |
| ) |
|
Read and calculate the approximate UV Index reading.
- Returns
- the UV Index as a floating point or NAN if reading failed
◆ readUVABI()
| void Adafruit_VEML6075::readUVABI |
( |
float * |
a, |
|
|
float * |
b, |
|
|
float * |
i |
|
) |
| |
read the calibrated UVA & UVB band reading and calculate the approximate UV Index reading
- Parameters
-
| a | pointer to store UVA reading or NAN if reading failed |
| b | pointer to store UVB reading or NAN if reading failed |
| i | pointer to store UVI reading or NAN if reading failed |
The documentation for this class was generated from the following files: