bdbcfd25d4
And save them with mqtt
15 lines
405 B
C
15 lines
405 B
C
#pragma once
|
|
#ifdef CONFIG_ENABLE_DHT
|
|
#include <DHT.h>
|
|
#define DHTTYPE DHT11
|
|
DHT *dht = NULL;
|
|
int DHTSetup(int pin);
|
|
int DHTGetTempAndHumidity(float &t, float &h);
|
|
bool DHTIsConnected();
|
|
|
|
#else //CONFIG_ENABLE_DHT
|
|
int DHTSetup(int pin){SKETCH_DEBUG_PRINTLN("DHT is disabled at build time"); return 0};
|
|
int DHTGetTempAndHumidity(float &t, float &h){return 0;};
|
|
bool DHTIsConnected(){return false;};
|
|
#endif
|