Adafruit HTU21D-F Arduino Library
Adafruit_HTU21DF.h
Go to the documentation of this file.
1 
5 #ifndef _ADAFRUIT_HTU21DF_H
6 #define _ADAFRUIT_HTU21DF_H
7 
8 #include <Adafruit_BusIO_Register.h>
9 #include <Adafruit_I2CDevice.h>
10 
12 #define HTU21DF_I2CADDR (0x40)
13 
15 #define HTU21DF_READTEMP (0xE3)
16 
18 #define HTU21DF_READHUM (0xE5)
19 
21 #define HTU21DF_WRITEREG (0xE6)
22 
24 #define HTU21DF_READREG (0xE7)
25 
27 #define HTU21DF_RESET (0xFE)
28 
33 public:
35 
36  bool begin(TwoWire *theWire = &Wire);
37  float readTemperature(void);
38  float readHumidity(void);
39  void reset(void);
40 
41 private:
42  Adafruit_I2CDevice *i2c_dev = NULL;
43  float _last_humidity, _last_temp;
44 };
45 
46 #endif /* _ADAFRUIT_HTU21DF_H */
bool begin(TwoWire *theWire=&Wire)
Definition: Adafruit_HTU21DF.cpp:45
void reset(void)
Definition: Adafruit_HTU21DF.cpp:66
float readTemperature(void)
Definition: Adafruit_HTU21DF.cpp:79
Adafruit_HTU21DF()
Definition: Adafruit_HTU21DF.cpp:33
Definition: Adafruit_HTU21DF.h:32
float readHumidity(void)
Definition: Adafruit_HTU21DF.cpp:117