diff --git a/WifiControlSensor/config.h b/WifiControlSensor/config.h index ed121a3..fb70dd1 100644 --- a/WifiControlSensor/config.h +++ b/WifiControlSensor/config.h @@ -50,3 +50,7 @@ #ifndef CONFIG_SETUP_GPIO #define CONFIG_SETUP_GPIO 3 #endif + +#ifndef CONFIG_DHT_TYPE +#define CONFIG_DHT_TYPE DHT11 +#endif diff --git a/WifiControlSensor/sensor_DHT.h b/WifiControlSensor/sensor_DHT.h index fbb87f9..1419adc 100644 --- a/WifiControlSensor/sensor_DHT.h +++ b/WifiControlSensor/sensor_DHT.h @@ -1,7 +1,7 @@ #pragma once #ifdef CONFIG_ENABLE_DHT #include -#define DHTTYPE DHT11 +#define DHTTYPE CONFIG_DHT_TYPE DHT *dht = NULL; int DHTSetup(int pin); int DHTGetTempAndHumidity(float &t, float &h);