diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/garage/.gitkeep b/garage/.gitkeep old mode 100644 new mode 100755 diff --git a/garage/Garage_-_Lichtschranke.fzz b/garage/Garage_-_Lichtschranke.fzz index 2141b3b..7e6d07c 100644 Binary files a/garage/Garage_-_Lichtschranke.fzz and b/garage/Garage_-_Lichtschranke.fzz differ diff --git a/garage/Garage_-_Nano_Micro.fzz b/garage/Garage_-_Nano_Micro.fzz old mode 100644 new mode 100755 diff --git a/garage/Garage_-_Nano_Micro.png b/garage/Garage_-_Nano_Micro.png old mode 100644 new mode 100755 diff --git a/garage/Garage_-_Nano_Micro_-_Lichtschranke.png b/garage/Garage_-_Nano_Micro_-_Lichtschranke.png old mode 100644 new mode 100755 diff --git a/garage/Garage_-_Nano_Micro_-_Lichtschranke/Garage_-_Nano_Micro_-_Lichtschranke.ino b/garage/Garage_-_Nano_Micro_-_Lichtschranke/Garage_-_Nano_Micro_-_Lichtschranke.ino index 79ddfa4..ead3f7f 100644 --- a/garage/Garage_-_Nano_Micro_-_Lichtschranke/Garage_-_Nano_Micro_-_Lichtschranke.ino +++ b/garage/Garage_-_Nano_Micro_-_Lichtschranke/Garage_-_Nano_Micro_-_Lichtschranke.ino @@ -37,10 +37,6 @@ void setup() { pinMode(remoteButton, INPUT); pinMode(motorButton, INPUT); - // disable SD card if one in the slot - pinMode(4, OUTPUT); - digitalWrite(4, HIGH); - // Serial.println("Starting ethernet"); Ethernet.begin(mac, ip); @@ -67,7 +63,6 @@ void loop() { // an http request ends with a blank line bool currentLineIsBlank = true; - byte trigger = 0; int sensorValue = 0; char uri[64]; byte idx = 0; @@ -105,21 +100,21 @@ void loop() { client.println(); if (uri[4] == '/' && uri[5] == 'r' && uri[6] == ' ') { client.println("trigger remote"); - trigger = 1; + triggerRemote(); } else if (uri[4] == '/' && uri[5] == 'm' && uri[6] == ' ') { client.println("trigger motor"); - trigger = 2; + triggerMotor(); } else if (uri[4] == '/' && uri[5] == 'a' && uri[6] == ' ') { client.println("trigger all"); - trigger = 3; + triggerAll(); } else if (uri[4] == '/' && uri[5] == 'o' && uri[6] == ' ') { // check if open if (sensorValue > 512) { client.println("closed, opening now"); - trigger = 2; + triggerMotor(); } else { client.println("already open"); @@ -132,7 +127,7 @@ void loop() { } else { client.println("open, closing now"); - trigger = 2; + triggerMotor(); } } else if (uri[4] == '/' && uri[5] == 's' && uri[6] == ' ') { @@ -167,18 +162,6 @@ void loop() { // close the connection: client.stop(); // Serial.println("client disconnected"); - - if (trigger == 1) { - triggerRemote(); - } - else if (trigger == 2) { - triggerMotor(); - } - else if (trigger == 3) { - triggerAll(); - } - - trigger = 0; } } diff --git a/garage/Garage_-_Wemos_D1_mini_-_Code.fzz b/garage/Garage_-_Wemos_D1_mini_-_Code.fzz old mode 100644 new mode 100755 diff --git a/garage/Garage_-_Wemos_D1_mini_-_Code_Steckplatine.png b/garage/Garage_-_Wemos_D1_mini_-_Code_Steckplatine.png old mode 100644 new mode 100755 diff --git a/garage/Garage_D1.ino b/garage/Garage_D1.ino old mode 100644 new mode 100755 diff --git a/garage/Garage_Nano.ino b/garage/Garage_Nano.ino old mode 100644 new mode 100755 diff --git a/garage/Garage_Nano_Micro_-_Case_enlarged_with_connectors.stl b/garage/Garage_Nano_Micro_-_Case_enlarged_with_connectors.stl old mode 100644 new mode 100755 diff --git a/garage/Webserver.ino b/garage/Webserver.ino old mode 100644 new mode 100755 diff --git a/garage/notes.md b/garage/notes.md old mode 100644 new mode 100755 diff --git a/nano/Lichtschranke_TCST2103/Lichtschranke_TCST2103.ino b/nano/Lichtschranke_TCST2103/Lichtschranke_TCST2103.ino old mode 100644 new mode 100755 diff --git a/pro_micro/.gitkeep b/pro_micro/.gitkeep old mode 100644 new mode 100755 diff --git a/pro_micro/pro_micro.ino b/pro_micro/pro_micro.ino old mode 100644 new mode 100755