DHT Sensor API¶
DHT Temperature and Humidity sensor library optimized for GSM module.
Header File¶
Functions¶
-
int
dht_read11(int iohandle, double *humidity, double *temperature)¶ DHT11 Read function
- Return
DHT error code dht_err_e
- Parameters
iohandle: [in] GPIO pin handle returned by gpio_request()humidity: [out] Humidity valuetemperature: [out] Temperature value
-
int
dht_read(int iohandle, double *humidity, double *temperature)¶ DHTXX Read function where XX is 21,22,33,44 A macro based shorthand is also available for code readability.
- See
- See
- See
- See
- Return
DHT error code dht_err_e
- Parameters
iohandle: [in] GPIO pin handle gpio_request()humidity: [out] Humidity valuetemperature: [out] Temperature value
Macros¶
-
DHT_LIB_VERSION¶ DHT Temperature & Humidity Sensor library optimized for GSM module
DHT Library based on Rob Tillaart’s DHTlib ref: https://github.com/RobTillaart/Arduino/tree/master/libraries/DHTlib version: 0.1.29
-
dht_read21(p, h, t)¶ DHT21 read
-
dht_read22(p, h, t)¶ DHT22 read
-
dht_read33(p, h, t)¶ DHT33 read
-
dht_read44(p, h, t)¶ DHT44 read
Enumerations¶
-
enum
dht_err_e¶ DHT err codes
Values:
-
enumerator
DHTLIB_OK¶ DHT Read ok
-
enumerator
DHTLIB_ERROR_CHECKSUM= -1¶ Checksum error
-
enumerator
DHTLIB_ERROR_TIMEOUT= -2¶ DHT read timeout
-
enumerator
DHTLIB_ERROR_CONNECT= -3¶ DHT connection error
-
enumerator
DHTLIB_ERROR_ACK_L= -4¶ DHT ACK signal low error (check connection)
-
enumerator
DHTLIB_ERROR_ACK_H= -5¶ DHT ACK signal high error (check connection)
-
enumerator
