2016-04-07 15:26:01 +02:00
|
|
|
#pragma once
|
|
|
|
#ifdef CONFIG_ENABLE_DHT
|
|
|
|
#include <DHT.h>
|
2016-07-09 14:35:55 +02:00
|
|
|
#define DHTTYPE CONFIG_DHT_TYPE
|
2016-04-07 15:26:01 +02:00
|
|
|
DHT *dht = NULL;
|
|
|
|
int DHTSetup(int pin);
|
|
|
|
int DHTGetTempAndHumidity(float &t, float &h);
|
|
|
|
bool DHTIsConnected();
|
|
|
|
|
|
|
|
#else //CONFIG_ENABLE_DHT
|
2017-01-01 23:35:19 +01:00
|
|
|
int DHTSetup(int){SKETCH_DEBUG_PRINTLN("DHT is disabled at build time"); return -1;};
|
|
|
|
int DHTGetTempAndHumidity(float &, float &){return -1;};
|
2016-04-07 15:26:01 +02:00
|
|
|
bool DHTIsConnected(){return false;};
|
|
|
|
#endif
|