DHT22 Temp & Humidity Sensor Library  v0.6
Library for the DHT22/CM3202/AM3202 Temperature and Humidity Module
dht22.h
Go to the documentation of this file.
1 
16 #ifndef __DHT22_SENSOR_H__ // Prevents duplicate
17 #define __DHT22_SENSOR_H__ // declarations
18 
19 #if defined(__cplusplus) // If compiling for C++
20 extern "C" { // Compile for C
21 #endif
22 
23 
24 // Units of temperature
25 #ifndef CELSIUS
26 #define CELSIUS 0
27 #endif
28 
29 #ifndef FAHRENHEIT
30 #define FAHRENHEIT 1
31 #endif
32 
33 #ifndef KELVIN
34 #define KELVIN 2
35 #endif
36 
37 
55 char dht22_read(int dht_pin);
56 
57 
69 void dht22_set_timeout_ignore(int dht_pin, char ignore_timeout);
70 
71 
81 int dht22_getTemp(char temp_units);
82 
83 
90 int dht22_getHumidity();
91 
92 
93 
94 #if defined(__cplusplus)
95 } // End compile for C block
96 #endif
97 /* __cplusplus */
98 
99 #endif // End prevent duplicate forward
100 /* __DHT22_SENSOR_H__ */ // declarations block
101 
102 
void dht22_set_timeout_ignore(int dht_pin, char ignore_timeout)
The function is used to set or clear an ignore timeout instruction for modules connected to the speci...
Definition: dht22.c:22
int dht22_getHumidity()
Retrieves the last humidity reading made by the read_dht22() function.
Definition: dht22.c:47
int dht22_getTemp(char temp_units)
Retrieves the last temperature reading made by the read_dht22() function.
Definition: dht22.c:36
char dht22_read(int dht_pin)
Triggers a reading from the temperature and humidity from the sensor module.
Definition: dht22.c:53