-
Notifications
You must be signed in to change notification settings - Fork 1
/
Ambimate.h
46 lines (37 loc) · 851 Bytes
/
Ambimate.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*!
* @file Ambimate.h
*
* This is a first go at a library for the TE Ambimate sensor module for
* Arduino platform. See https://www.te.com/usa-en/products/sensors/multi-sensor-modules.html?tab=pgp-story
*
* These sensors use I2C to communicate, 2 pins (SCL+SDA) are required
* to interface with the breakout.
*
* Written by Gary Barnett
*
* MIT License
*
*/
#include "Arduino.h"
#include <Wire.h>
// the i2c address
#define AMBIMATE_I2CADDR_DEFAULT 0x2A ///< Ambimate has only one I2C address
class Ambimate {
public:
Ambimate();
boolean begin(TwoWire *theWire = NULL);
boolean Measure(void);
boolean HasGas(void);
unsigned char opt_sensors;
uint16_t TVOC;
uint16_t eCO2;
float HUM;
float TEMP;
float VOLTS;
uint16_t LUM;
uint16_t AUDIO;
boolean EVENT;
private:
TwoWire *_i2c;
uint8_t _i2caddr;
};