diff --git a/garage/Garage_-_Lichtschranke.fzz b/garage/Garage_-_Lichtschranke.fzz index 428756f..445b6a8 100644 Binary files a/garage/Garage_-_Lichtschranke.fzz and b/garage/Garage_-_Lichtschranke.fzz differ diff --git a/garage/Garage_-_Nano_Micro_-_Lichtschranke.ino b/garage/Garage_-_Nano_Micro_-_Lichtschranke.ino index 398ccbf..d64744f 100644 --- a/garage/Garage_-_Nano_Micro_-_Lichtschranke.ino +++ b/garage/Garage_-_Nano_Micro_-_Lichtschranke.ino @@ -9,13 +9,15 @@ EthernetServer server(80); const int remotePin = 2; const int motorPin = 3; -const int ledPin = LED_BUILTIN; +const int ledPin = 5; const int remoteButton = 6; const int motorButton = 7; const int sensorPin = A0; +const int clickDelay = 500; + void setup() { Serial.begin(9600); @@ -35,7 +37,6 @@ void setup() { pinMode(remoteButton, INPUT); pinMode(motorButton, INPUT); - // disable SD card if one in the slot pinMode(4, OUTPUT); digitalWrite(4, HIGH); @@ -143,7 +144,7 @@ void loop() { } } // give the web browser time to receive the data - delay(20); + delay(1); // close the connection: client.stop(); Serial.println("client disconnected"); @@ -167,7 +168,7 @@ void triggerRemote() { Serial.println("triggerRemote"); digitalWrite(remotePin, HIGH); digitalWrite(ledPin, HIGH); - delay(1000); + delay(clickDelay); digitalWrite(remotePin, LOW); digitalWrite(ledPin, LOW); } @@ -176,7 +177,7 @@ void triggerMotor() { Serial.println("triggerMotor"); digitalWrite(motorPin, HIGH); digitalWrite(ledPin, HIGH); - delay(1000); + delay(clickDelay); digitalWrite(motorPin, LOW); digitalWrite(ledPin, LOW); } @@ -186,7 +187,7 @@ void triggerAll() { digitalWrite(remotePin, HIGH); digitalWrite(motorPin, HIGH); digitalWrite(ledPin, HIGH); - delay(1000); + delay(clickDelay); digitalWrite(remotePin, LOW); digitalWrite(motorPin, LOW); digitalWrite(ledPin, LOW); diff --git a/garage/Garage_-_Nano_Micro_-_Lichtschranke.png b/garage/Garage_-_Nano_Micro_-_Lichtschranke.png index 41af648..df0978e 100644 Binary files a/garage/Garage_-_Nano_Micro_-_Lichtschranke.png and b/garage/Garage_-_Nano_Micro_-_Lichtschranke.png differ