From d3d7e0318a4c7e575d93b55e226378c87317652b Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Sat, 9 Jul 2016 14:35:55 +0200 Subject: [PATCH] you can configure DHT type --- WifiControlSensor/config.h | 4 ++++ WifiControlSensor/sensor_DHT.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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);