Gabellichtschranke TCST 2103 - Version 3
This commit is contained in:
Binary file not shown.
@@ -9,13 +9,15 @@ EthernetServer server(80);
|
|||||||
const int remotePin = 2;
|
const int remotePin = 2;
|
||||||
const int motorPin = 3;
|
const int motorPin = 3;
|
||||||
|
|
||||||
const int ledPin = LED_BUILTIN;
|
const int ledPin = 5;
|
||||||
|
|
||||||
const int remoteButton = 6;
|
const int remoteButton = 6;
|
||||||
const int motorButton = 7;
|
const int motorButton = 7;
|
||||||
|
|
||||||
const int sensorPin = A0;
|
const int sensorPin = A0;
|
||||||
|
|
||||||
|
const int clickDelay = 500;
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
|
|
||||||
@@ -35,7 +37,6 @@ void setup() {
|
|||||||
pinMode(remoteButton, INPUT);
|
pinMode(remoteButton, INPUT);
|
||||||
pinMode(motorButton, INPUT);
|
pinMode(motorButton, INPUT);
|
||||||
|
|
||||||
|
|
||||||
// disable SD card if one in the slot
|
// disable SD card if one in the slot
|
||||||
pinMode(4, OUTPUT);
|
pinMode(4, OUTPUT);
|
||||||
digitalWrite(4, HIGH);
|
digitalWrite(4, HIGH);
|
||||||
@@ -143,7 +144,7 @@ void loop() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// give the web browser time to receive the data
|
// give the web browser time to receive the data
|
||||||
delay(20);
|
delay(1);
|
||||||
// close the connection:
|
// close the connection:
|
||||||
client.stop();
|
client.stop();
|
||||||
Serial.println("client disconnected");
|
Serial.println("client disconnected");
|
||||||
@@ -167,7 +168,7 @@ void triggerRemote() {
|
|||||||
Serial.println("triggerRemote");
|
Serial.println("triggerRemote");
|
||||||
digitalWrite(remotePin, HIGH);
|
digitalWrite(remotePin, HIGH);
|
||||||
digitalWrite(ledPin, HIGH);
|
digitalWrite(ledPin, HIGH);
|
||||||
delay(1000);
|
delay(clickDelay);
|
||||||
digitalWrite(remotePin, LOW);
|
digitalWrite(remotePin, LOW);
|
||||||
digitalWrite(ledPin, LOW);
|
digitalWrite(ledPin, LOW);
|
||||||
}
|
}
|
||||||
@@ -176,7 +177,7 @@ void triggerMotor() {
|
|||||||
Serial.println("triggerMotor");
|
Serial.println("triggerMotor");
|
||||||
digitalWrite(motorPin, HIGH);
|
digitalWrite(motorPin, HIGH);
|
||||||
digitalWrite(ledPin, HIGH);
|
digitalWrite(ledPin, HIGH);
|
||||||
delay(1000);
|
delay(clickDelay);
|
||||||
digitalWrite(motorPin, LOW);
|
digitalWrite(motorPin, LOW);
|
||||||
digitalWrite(ledPin, LOW);
|
digitalWrite(ledPin, LOW);
|
||||||
}
|
}
|
||||||
@@ -186,7 +187,7 @@ void triggerAll() {
|
|||||||
digitalWrite(remotePin, HIGH);
|
digitalWrite(remotePin, HIGH);
|
||||||
digitalWrite(motorPin, HIGH);
|
digitalWrite(motorPin, HIGH);
|
||||||
digitalWrite(ledPin, HIGH);
|
digitalWrite(ledPin, HIGH);
|
||||||
delay(1000);
|
delay(clickDelay);
|
||||||
digitalWrite(remotePin, LOW);
|
digitalWrite(remotePin, LOW);
|
||||||
digitalWrite(motorPin, LOW);
|
digitalWrite(motorPin, LOW);
|
||||||
digitalWrite(ledPin, LOW);
|
digitalWrite(ledPin, LOW);
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 529 KiB After Width: | Height: | Size: 453 KiB |
Reference in New Issue
Block a user