1
1
/* !
2
- * @file WipperSnapper_I2C_Driver_LTR329 .h
2
+ * @file WipperSnapper_I2C_Driver_LTR329_LTR303 .h
3
3
*
4
- * Device driver for the LTR329 light sensor .
4
+ * Device driver for the LTR329 + LTR303 (329+interrupt) light sensors .
5
5
*
6
6
* Adafruit invests time and resources providing this open source code,
7
7
* please support Adafruit and open-source hardware by purchasing
12
12
* MIT license, all text here must be included in any redistribution.
13
13
*
14
14
*/
15
- #ifndef WipperSnapper_I2C_Driver_LTR329_H
16
- #define WipperSnapper_I2C_Driver_LTR329_H
15
+ #ifndef WipperSnapper_I2C_Driver_LTR329_LTR303_H
16
+ #define WipperSnapper_I2C_Driver_LTR329_LTR303_H
17
17
18
18
#include " WipperSnapper_I2C_Driver.h"
19
19
#include < Adafruit_LTR329_LTR303.h>
20
20
21
21
/* *************************************************************************/
22
22
/* !
23
- @brief Class that provides a driver interface for a LTR329 sensor.
23
+ @brief Class that provides a driver interface for a LTR329/303 sensor.
24
24
*/
25
25
/* *************************************************************************/
26
- class WipperSnapper_I2C_Driver_LTR329 : public WipperSnapper_I2C_Driver {
26
+ class WipperSnapper_I2C_Driver_LTR329_LTR303 : public WipperSnapper_I2C_Driver {
27
27
public:
28
28
/* ******************************************************************************/
29
29
/* !
30
- @brief Constructor for a LTR329 sensor.
30
+ @brief Constructor for a LTR329/303 sensor.
31
31
@param i2c
32
32
The I2C interface.
33
33
@param sensorAddress
34
34
The 7-bit I2C address of the sensor.
35
35
*/
36
36
/* ******************************************************************************/
37
- WipperSnapper_I2C_Driver_LTR329 (TwoWire *i2c, uint16_t sensorAddress)
37
+ WipperSnapper_I2C_Driver_LTR329_LTR303 (TwoWire *i2c, uint16_t sensorAddress)
38
38
: WipperSnapper_I2C_Driver(i2c, sensorAddress) {
39
39
_i2c = i2c;
40
40
_sensorAddress = sensorAddress;
41
41
}
42
42
43
43
/* ******************************************************************************/
44
44
/* !
45
- @brief Destructor for an LTR329 sensor.
45
+ @brief Destructor for an LTR329/303 sensor.
46
46
*/
47
47
/* ******************************************************************************/
48
- ~WipperSnapper_I2C_Driver_LTR329 () { delete _LTR329; }
48
+ ~WipperSnapper_I2C_Driver_LTR329_LTR303 () { delete _LTR329; }
49
49
50
50
/* ******************************************************************************/
51
51
/* !
52
- @brief Initializes the LTR329 sensor and begins I2C.
52
+ @brief Initializes the LTR329/303 sensor and begins I2C.
53
53
@returns True if initialized successfully, False otherwise.
54
54
*/
55
55
/* ******************************************************************************/
@@ -72,7 +72,7 @@ class WipperSnapper_I2C_Driver_LTR329 : public WipperSnapper_I2C_Driver {
72
72
/* !
73
73
@brief Reads the LTR329's ambient light level ([Visible+IR] - IR-only)
74
74
@param lightEvent
75
- Light sensor reading, in lux .
75
+ Light sensor reading.
76
76
@returns True if the sensor event was obtained successfully, False
77
77
otherwise.
78
78
*/
@@ -120,4 +120,4 @@ class WipperSnapper_I2C_Driver_LTR329 : public WipperSnapper_I2C_Driver {
120
120
uint16_t _delayBetweenReads;
121
121
};
122
122
123
- #endif // WipperSnapper_I2C_Driver_LTR329
123
+ #endif // WipperSnapper_I2C_Driver_LTR329_LTR303
0 commit comments