diff --git a/html/_adafruit___v_e_m_l6046_8h_source.html b/html/_adafruit___v_e_m_l6046_8h_source.html index a60f4ad..1501ec3 100644 --- a/html/_adafruit___v_e_m_l6046_8h_source.html +++ b/html/_adafruit___v_e_m_l6046_8h_source.html @@ -62,7 +62,7 @@ $(function() {
Adafruit_VEML6046.h
-Go to the documentation of this file.
1 
20 #ifndef _ADAFRUIT_VEML6046_H
21 #define _ADAFRUIT_VEML6046_H
22 
23 #include <Adafruit_BusIO_Register.h>
24 #include <Adafruit_I2CDevice.h>
25 
26 #include "Arduino.h"
27 
29 #define VEML6046_DEFAULT_ADDR 0x29
30 
32 #define VEML6046_REG_RGB_CONF_0 0x00
33 #define VEML6046_REG_RGB_CONF_1 0x01
34 #define VEML6046_REG_G_THDH_L 0x04
35 #define VEML6046_REG_G_THDH_H 0x05
36 #define VEML6046_REG_G_THDL_L 0x06
37 #define VEML6046_REG_G_THDL_H 0x07
38 #define VEML6046_REG_R_DATA_L 0x10
39 #define VEML6046_REG_R_DATA_H 0x11
40 #define VEML6046_REG_G_DATA_L 0x12
41 #define VEML6046_REG_G_DATA_H 0x13
42 #define VEML6046_REG_B_DATA_L 0x14
43 #define VEML6046_REG_B_DATA_H 0x15
44 #define VEML6046_REG_IR_DATA_L 0x16
45 #define VEML6046_REG_IR_DATA_H 0x17
46 #define VEML6046_REG_ID_L 0x18
47 #define VEML6046_REG_ID_H 0x19
48 #define VEML6046_REG_INT_FLAG 0x1A
49 
50 
53 typedef enum {
63 
67 typedef enum {
73 
77 typedef enum {
78  VEML6046_PERS_1 = 0x00,
79  VEML6046_PERS_2 = 0x01,
80  VEML6046_PERS_4 = 0x02,
83 
88  public:
91  bool begin(uint8_t i2c_addr = VEML6046_DEFAULT_ADDR, TwoWire* wire = &Wire);
92 
95 
96  bool setRGBModeForced(bool forced);
97  bool getRGBModeForced(void);
98 
99  bool RGBTrigger(void);
100  bool isTriggered(void);
101 
102  bool setGreenIntEnabled(bool enabled);
103  bool getGreenIntEnabled(void);
104 
105  bool enable(void);
106  bool isEnabled(void);
107 
108  bool setPhotoDiodeHalfSize(bool half_size);
109  bool getPhotoDiodeHalfSize(void);
110 
111  bool setRGBGain(veml6046_gain_t gain);
113 
116 
117  bool setRGBCalibration(bool enabled);
118  bool getRGBCalibration(void);
119 
120  bool setGreenThresholdHigh(uint16_t threshold);
121  uint16_t getGreenThresholdHigh(void);
122 
123  bool setGreenThresholdLow(uint16_t threshold);
124  uint16_t getGreenThresholdLow(void);
125 
126  bool getData(uint16_t* r, uint16_t* g, uint16_t* b, uint16_t* ir);
127 
128  private:
129  Adafruit_I2CDevice* i2c_dev;
130 };
131 
132 #endif
6.25 ms integration time
Definition: Adafruit_VEML6046.h:55
+Go to the documentation of this file.
1 
20 #ifndef _ADAFRUIT_VEML6046_H
21 #define _ADAFRUIT_VEML6046_H
22 
23 #include <Adafruit_BusIO_Register.h>
24 #include <Adafruit_I2CDevice.h>
25 
26 #include "Arduino.h"
27 
29 #define VEML6046_DEFAULT_ADDR 0x29
30 
32 #define VEML6046_REG_RGB_CONF_0 0x00
33 #define VEML6046_REG_RGB_CONF_1 0x01
34 #define VEML6046_REG_G_THDH_L 0x04
35 #define VEML6046_REG_G_THDH_H 0x05
36 #define VEML6046_REG_G_THDL_L 0x06
37 #define VEML6046_REG_G_THDL_H 0x07
38 #define VEML6046_REG_R_DATA_L 0x10
39 #define VEML6046_REG_R_DATA_H 0x11
40 #define VEML6046_REG_G_DATA_L 0x12
41 #define VEML6046_REG_G_DATA_H 0x13
42 #define VEML6046_REG_B_DATA_L 0x14
43 #define VEML6046_REG_B_DATA_H 0x15
44 #define VEML6046_REG_IR_DATA_L 0x16
45 #define VEML6046_REG_IR_DATA_H 0x17
46 #define VEML6046_REG_ID_L 0x18
47 #define VEML6046_REG_ID_H 0x19
48 #define VEML6046_REG_INT_FLAG 0x1A
49 
50 
53 typedef enum {
63 
67 typedef enum {
73 
77 typedef enum {
78  VEML6046_PERS_1 = 0x00,
79  VEML6046_PERS_2 = 0x01,
80  VEML6046_PERS_4 = 0x02,
83 
88  public:
91  bool begin(uint8_t i2c_addr = VEML6046_DEFAULT_ADDR, TwoWire* wire = &Wire);
92 
95 
96  bool setRGBModeForced(bool forced);
97  bool getRGBModeForced(void);
98 
99  bool RGBTrigger(void);
100  bool isTriggered(void);
101 
102  bool setGreenIntEnabled(bool enabled);
103  bool getGreenIntEnabled(void);
104 
105  bool enable(void);
106  bool isEnabled(void);
107 
108  bool setPhotoDiodeHalfSize(bool half_size);
109  bool getPhotoDiodeHalfSize(void);
110 
111  bool setRGBGain(veml6046_gain_t gain);
113 
116 
117  bool setRGBCalibration(bool enabled);
118  bool getRGBCalibration(void);
119 
120  bool setGreenThresholdHigh(uint16_t threshold);
121  uint16_t getGreenThresholdHigh(void);
122 
123  bool setGreenThresholdLow(uint16_t threshold);
124  uint16_t getGreenThresholdLow(void);
125 
126  bool getData(uint16_t* r, uint16_t* g, uint16_t* b, uint16_t* ir);
127 
128  float calculateLux(uint16_t green_count);
129 
130  private:
131  Adafruit_I2CDevice* i2c_dev;
132 };
133 
134 #endif
6.25 ms integration time
Definition: Adafruit_VEML6046.h:55
bool isTriggered(void)
Checks if measurement is still in progress (trigger bit set)
Definition: Adafruit_VEML6046.cpp:159
bool setRGBModeForced(bool forced)
Sets the RGB measurement mode (auto vs forced)
Definition: Adafruit_VEML6046.cpp:120
Main VEML6046 class for RGBIR color sensor.
Definition: Adafruit_VEML6046.h:87
@@ -97,6 +97,7 @@ $(function() {
8 times
Definition: Adafruit_VEML6046.h:81
4 times
Definition: Adafruit_VEML6046.h:80
veml6046_integration_time_t getIntegrationTime(void)
Gets the current integration time setting.
Definition: Adafruit_VEML6046.cpp:106
+
float calculateLux(uint16_t green_count)
Calculates lux value from green channel count.
Definition: Adafruit_VEML6046.cpp:408
400 ms integration time
Definition: Adafruit_VEML6046.h:61
3.125 ms integration time (default)
Definition: Adafruit_VEML6046.h:54
Gain x1 (default)
Definition: Adafruit_VEML6046.h:68
diff --git a/html/class_adafruit___v_e_m_l6046-members.html b/html/class_adafruit___v_e_m_l6046-members.html index e77230f..3d34928 100644 --- a/html/class_adafruit___v_e_m_l6046-members.html +++ b/html/class_adafruit___v_e_m_l6046-members.html @@ -67,30 +67,31 @@ $(function() { - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + +
Adafruit_VEML6046()Adafruit_VEML6046
begin(uint8_t i2c_addr=VEML6046_DEFAULT_ADDR, TwoWire *wire=&Wire)Adafruit_VEML6046
enable(void)Adafruit_VEML6046
getData(uint16_t *r, uint16_t *g, uint16_t *b, uint16_t *ir)Adafruit_VEML6046
getGreenIntEnabled(void)Adafruit_VEML6046
getGreenThresholdHigh(void)Adafruit_VEML6046
getGreenThresholdLow(void)Adafruit_VEML6046
getIntegrationTime(void)Adafruit_VEML6046
getIntPersistence(void)Adafruit_VEML6046
getPhotoDiodeHalfSize(void)Adafruit_VEML6046
getRGBCalibration(void)Adafruit_VEML6046
getRGBGain(void)Adafruit_VEML6046
getRGBModeForced(void)Adafruit_VEML6046
isEnabled(void)Adafruit_VEML6046
isTriggered(void)Adafruit_VEML6046
RGBTrigger(void)Adafruit_VEML6046
setGreenIntEnabled(bool enabled)Adafruit_VEML6046
setGreenThresholdHigh(uint16_t threshold)Adafruit_VEML6046
setGreenThresholdLow(uint16_t threshold)Adafruit_VEML6046
setIntegrationTime(veml6046_integration_time_t it)Adafruit_VEML6046
setIntPersistence(veml6046_persistence_t pers)Adafruit_VEML6046
setPhotoDiodeHalfSize(bool half_size)Adafruit_VEML6046
setRGBCalibration(bool enabled)Adafruit_VEML6046
setRGBGain(veml6046_gain_t gain)Adafruit_VEML6046
setRGBModeForced(bool forced)Adafruit_VEML6046
~Adafruit_VEML6046()Adafruit_VEML6046
calculateLux(uint16_t green_count)Adafruit_VEML6046
enable(void)Adafruit_VEML6046
getData(uint16_t *r, uint16_t *g, uint16_t *b, uint16_t *ir)Adafruit_VEML6046
getGreenIntEnabled(void)Adafruit_VEML6046
getGreenThresholdHigh(void)Adafruit_VEML6046
getGreenThresholdLow(void)Adafruit_VEML6046
getIntegrationTime(void)Adafruit_VEML6046
getIntPersistence(void)Adafruit_VEML6046
getPhotoDiodeHalfSize(void)Adafruit_VEML6046
getRGBCalibration(void)Adafruit_VEML6046
getRGBGain(void)Adafruit_VEML6046
getRGBModeForced(void)Adafruit_VEML6046
isEnabled(void)Adafruit_VEML6046
isTriggered(void)Adafruit_VEML6046
RGBTrigger(void)Adafruit_VEML6046
setGreenIntEnabled(bool enabled)Adafruit_VEML6046
setGreenThresholdHigh(uint16_t threshold)Adafruit_VEML6046
setGreenThresholdLow(uint16_t threshold)Adafruit_VEML6046
setIntegrationTime(veml6046_integration_time_t it)Adafruit_VEML6046
setIntPersistence(veml6046_persistence_t pers)Adafruit_VEML6046
setPhotoDiodeHalfSize(bool half_size)Adafruit_VEML6046
setRGBCalibration(bool enabled)Adafruit_VEML6046
setRGBGain(veml6046_gain_t gain)Adafruit_VEML6046
setRGBModeForced(bool forced)Adafruit_VEML6046
~Adafruit_VEML6046()Adafruit_VEML6046
+ +

◆ calculateLux()

+ +
+
+ + + + + + + + +
float Adafruit_VEML6046::calculateLux (uint16_t green_count)
+
+ +

Calculates lux value from green channel count.

+
Parameters
+ + +
green_countRaw green channel reading
+
+
+
Returns
Calculated lux value
+

The documentation for this class was generated from the following files: