Added gitignore file. Added sensor selection to DHT config for DHT11/… (#152)

* Added gitignore file. Added sensor selection to DHT config for DHT11/21/22 sensors. DHT22 used a default to ensure backwards compatibility.

* Removed quotes to fix compliation error.

* Moved local ignored file from .gitignore to .git/info/exclude per request. Removed .gitignore.
This commit is contained in:
Eric Hosford authored and Florian committed 2018-01-06 07:56:25 +01:00
1 parent 0a1f2b1cdb
commit 9d55af871b
2 files changed
+5 -1

No files matched your search

+1 -1
View File
@@ -31,7 +31,7 @@
#include <DHT.h>
#include <DHT_U.h>
DHT dht(DHT_RECEIVER_PIN,DHT22);
DHT dht(DHT_RECEIVER_PIN,DHT_SENSOR_TYPE);
//Time used to wait for an interval before resending temp and hum
unsigned long timedht = 0;
+4
View File
@@ -30,6 +30,10 @@
#define TEMP1 "home/DHTtoMQTT/dht1/temp"
#define dht_always true // if false when the current value for temp or hum is the same as previous one don't send it by MQTT
#define TimeBetweenReadingDHT 30000 // time between 2 DHT readings
/*-------------DHT SENSOR TYPE-------------*/
//#define DHT_SENSOR_TYPE DHT11 //uncomment for DHT11 Sensor
//#define DHT_SENSOR_TYPE DHT21 //uncomment for DHT21 Sensor
#define DHT_SENSOR_TYPE DHT22 //uncomment for DHT22 Sensor (default for backwards compatibility)
/*-------------------PIN DEFINITIONS----------------------*/
#if defined(ESP8266) || defined(ESP32)
#define DHT_RECEIVER_PIN D1 // you can put D5 if you don't use HCSR501 sensor and the RFM69