Loading...
Searching...
No Matches

Device driver interface for the DHT family of humidity and temperature sensors. More...

Detailed Description

Device driver interface for the DHT family of humidity and temperature sensors.

Author
Ludwig Knüpfer <ludwi.nosp@m.g.kn.nosp@m.uepfe.nosp@m.r@fu.nosp@m.-berl.nosp@m.in.d.nosp@m.e
Christian Mehlis mehli.nosp@m.s@in.nosp@m.f.fu-.nosp@m.berl.nosp@m.in.de
Hauke Petersen hauke.nosp@m..pet.nosp@m.ersen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de

Definition in file dht.h.

#include <errno.h>
#include <stdint.h>
#include "periph/gpio.h"
+ Include dependency graph for dht.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dht_data_t
 Data type for storing DHT sensor readings. More...
 
struct  dht_params_t
 Configuration parameters for DHT devices. More...
 
struct  dht_t
 Device descriptor for DHT sensor devices. More...
 

Enumerations

enum  { DHT_OK = 0 , DHT_NOCSUM = -EIO , DHT_TIMEOUT = -ETIMEDOUT }
 Possible return codes. More...
 
enum  dht_type_t {
  DHT11 , DHT11_2022 , DHT22 , DHT21 = DHT22 ,
  AM2301 = DHT22
}
 Device type of the DHT device. More...
 

Functions

int dht_init (dht_t *dev, const dht_params_t *params)
 Initialize a new DHT device.
 
int dht_read (dht_t *dev, int16_t *temp, int16_t *hum)
 get a new temperature and humidity value from the device