From 764b18e5391d64c13dd15acb6421b8e5f285ac21 Mon Sep 17 00:00:00 2001 From: jct Date: Wed, 27 Nov 2019 09:19:23 +0000 Subject: [PATCH] Moved temp sensor to seperate pin (#3) --- src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 205f899..86c6cb6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,6 +6,7 @@ const int TEMPERATURE_INTERVAL = 60; unsigned long lastTemperatureSent = 0; const int PIN_RELAY = D1; +const int PIN_DHT11 = D2; #define OUTPUT_SET(x) digitalWrite(PIN_RELAY, x ? LOW : HIGH) unsigned int timer = 0; unsigned int next_timer_update = 0; @@ -50,7 +51,7 @@ void setupHandler() { powerNode.setProperty("timer").send("0"); - dht.setup(D1, DHTesp::DHT11); // Connect DHT sensor to GPIO 17 + dht.setup(PIN_DHT11, DHTesp::DHT11); // Connect DHT sensor to GPIO 17 } void loopHandler() {