[FIX] use correct digital pin number constant + do not deep sleep, if the lights are on

This commit is contained in:
Jannik Beyerstedt 2017-07-28 19:34:40 +02:00
parent 0098c7aaaf
commit 026ca60835
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ const char* host = "ursaminor.local";
String serviceUri = "/service.php";
const int httpPort = 8088;
const int relaisPin = 3;
const int relaisPin = D3;
bool lightState = false;
unsigned int lightTime = 0;
@ -121,7 +121,7 @@ void loop() {
}
// only deep sleep, if the time is more than 5 minutes
if (lightTime >= 5) {
if (lightTime >= 5 && lightState == false) {
Serial.println("going for a deep sleep");
Serial.println("");
Serial.flush();