Domotique/WifiControlSensor/sensor_DHT.h

15 lines
418 B
C
Raw Normal View History

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