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 <stdint.h>
#include "periph/gpio.h"
+ Include dependency graph for dht.h:

Go to the source code of this file.

Data Structures

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

Typedefs

typedef dht_t dht_params_t
 Configuration parameters for DHT devices.
 

Enumerations

enum  { DHT_OK = 0, DHT_NOCSUM = -1, DHT_NODEV = -2 }
 Possible return codes. More...
 
enum  dht_type_t { DHT11, DHT22, DHT21 = 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. More...
 
int dht_read (const dht_t *dev, int16_t *temp, int16_t *hum)
 get a new temperature and humidity value from the device More...