Guten Abend liebe Gemeinde
ich stehe komplett auf dem Schlauch.....
ich versuche seit stunden eine oder abfrage zu erstellen jedoch nimmt er immer nur die erste bedingung......den Schalter nimmt er gar nicht erst
int RELAIS1 = 22; //Arduino Pin 23 Hochspannungsblitze
int RELAIS2 = 23; //Arduino Pin 25 Antenne 1
int RELAIS3 = 24; //Arduino Pin 27 Antenne 2
int RELAIS4 = 25; //Arduino Pin 29 Antenne 3
int RELAIS5 = 26; //Arduino Pin 31 Antenne 4
int RELAIS6 = 27; //Arduino Pin 33 Antenne 5
int RELAIS7 = 28; //Arduino Pin 35
int RELAIS8 = 29; //Arduino Pin 37
int RELAIS9 = 30; //Arduino Pin 39
int RELAIS10 = 31; //Arduino Pin 41
int RELAIS11 = 32; //Arduino Pin 43
int RELAIS12 = 33; //Arduino Pin 45
int EINSCHALTER = 49; //Arduino pin 49 Schalter Animatronic EIN
int EINTASTER = 51; // Arduino pin 51 Taster Animatronic EIN
int WARTEZEIT = 3500;
int DAUER = 175;
void setup() {
pinMode(RELAIS1, OUTPUT);
pinMode(RELAIS2, OUTPUT);
pinMode(RELAIS3, OUTPUT);
pinMode(RELAIS4, OUTPUT);
pinMode(RELAIS5, OUTPUT);
pinMode(RELAIS6, OUTPUT);
pinMode(RELAIS7, OUTPUT);
pinMode(RELAIS8, OUTPUT);
pinMode(RELAIS9, OUTPUT);
pinMode(RELAIS10, OUTPUT);
pinMode(RELAIS11, OUTPUT);
pinMode(RELAIS12, OUTPUT);
pinMode(EINSCHALTER, INPUT);
pinMode(EINTASTER, INPUT);
}
void loop() {
if (digitalRead (EINTASTER)==HIGH || (EINSCHALTER)==HIGH) {
digitalWrite(RELAIS1, HIGH);
digitalWrite(RELAIS2, HIGH);
digitalWrite(RELAIS3, HIGH);
digitalWrite(RELAIS4, HIGH);
digitalWrite(RELAIS5, HIGH);
digitalWrite(RELAIS6, HIGH);
digitalWrite(RELAIS7, HIGH);
digitalWrite(RELAIS8, HIGH);
digitalWrite(RELAIS9, HIGH);
digitalWrite(RELAIS10, HIGH);
digitalWrite(RELAIS11, HIGH);
digitalWrite(RELAIS12, HIGH);
delay(DAUER);
digitalWrite(RELAIS2, LOW);
digitalWrite(RELAIS3, HIGH);
digitalWrite(RELAIS4, HIGH);
digitalWrite(RELAIS5, HIGH);
digitalWrite(RELAIS6, HIGH);
digitalWrite(RELAIS8, LOW);
digitalWrite(RELAIS9, HIGH);
digitalWrite(RELAIS10, HIGH);
digitalWrite(RELAIS11, HIGH);
digitalWrite(RELAIS12, HIGH);
delay(DAUER);
digitalWrite(RELAIS2, HIGH);
digitalWrite(RELAIS3, LOW);
digitalWrite(RELAIS4, HIGH);
digitalWrite(RELAIS5, HIGH);
digitalWrite(RELAIS6, HIGH);
digitalWrite(RELAIS8, HIGH);
digitalWrite(RELAIS9, LOW);
digitalWrite(RELAIS10, HIGH);
digitalWrite(RELAIS11, HIGH);
digitalWrite(RELAIS12, HIGH);
delay(DAUER);
digitalWrite(RELAIS2, HIGH);
digitalWrite(RELAIS3, HIGH);
digitalWrite(RELAIS4, LOW);
digitalWrite(RELAIS5, HIGH);
digitalWrite(RELAIS6, HIGH);
digitalWrite(RELAIS8, HIGH);
digitalWrite(RELAIS9, HIGH);
digitalWrite(RELAIS10, LOW);
digitalWrite(RELAIS11, HIGH);
digitalWrite(RELAIS12, HIGH);
delay(DAUER);
digitalWrite(RELAIS2, HIGH);
digitalWrite(RELAIS3, HIGH);
digitalWrite(RELAIS4, HIGH);
digitalWrite(RELAIS5, LOW);
digitalWrite(RELAIS6, HIGH);
digitalWrite(RELAIS8, HIGH);
digitalWrite(RELAIS9, HIGH);
digitalWrite(RELAIS10, HIGH);
digitalWrite(RELAIS11, LOW);
digitalWrite(RELAIS12, HIGH);
delay(DAUER);
digitalWrite(RELAIS2, HIGH);
digitalWrite(RELAIS3, HIGH);
digitalWrite(RELAIS4, HIGH);
digitalWrite(RELAIS5, HIGH);
digitalWrite(RELAIS6, LOW);
digitalWrite(RELAIS8, HIGH);
digitalWrite(RELAIS9, HIGH);
digitalWrite(RELAIS10, HIGH);
digitalWrite(RELAIS11, HIGH);
digitalWrite(RELAIS12, LOW);
delay(DAUER);
digitalWrite(RELAIS1, HIGH);
digitalWrite(RELAIS2, HIGH);
digitalWrite(RELAIS3, HIGH);
digitalWrite(RELAIS4, HIGH);
digitalWrite(RELAIS5, HIGH);
digitalWrite(RELAIS6, HIGH);
digitalWrite(RELAIS7, HIGH);
digitalWrite(RELAIS8, HIGH);
digitalWrite(RELAIS9, HIGH);
digitalWrite(RELAIS10, HIGH);
digitalWrite(RELAIS11, HIGH);
digitalWrite(RELAIS12, HIGH);
delay(DAUER);
digitalWrite(RELAIS2, LOW);
digitalWrite(RELAIS3, HIGH);
digitalWrite(RELAIS4, HIGH);
digitalWrite(RELAIS5, HIGH);
digitalWrite(RELAIS6, HIGH);
digitalWrite(RELAIS8, LOW);
digitalWrite(RELAIS9, HIGH);
digitalWrite(RELAIS10, HIGH);
digitalWrite(RELAIS11, HIGH);
digitalWrite(RELAIS12, HIGH);
delay(DAUER);
digitalWrite(RELAIS2, HIGH);
digitalWrite(RELAIS3, LOW);
digitalWrite(RELAIS4, HIGH);
digitalWrite(RELAIS5, HIGH);
digitalWrite(RELAIS6, HIGH);
digitalWrite(RELAIS8, HIGH);
digitalWrite(RELAIS9, LOW);
digitalWrite(RELAIS10, HIGH);
digitalWrite(RELAIS11, HIGH);
digitalWrite(RELAIS12, HIGH);
delay(DAUER);
digitalWrite(RELAIS2, HIGH);
digitalWrite(RELAIS3, HIGH);
digitalWrite(RELAIS4, LOW);
digitalWrite(RELAIS5, HIGH);
digitalWrite(RELAIS6, HIGH);
digitalWrite(RELAIS8, HIGH);
digitalWrite(RELAIS9, HIGH);
digitalWrite(RELAIS10, LOW);
digitalWrite(RELAIS11, HIGH);
digitalWrite(RELAIS12, HIGH);
delay(DAUER);
digitalWrite(RELAIS2, HIGH);
digitalWrite(RELAIS3, HIGH);
digitalWrite(RELAIS4, HIGH);
digitalWrite(RELAIS5, LOW);
digitalWrite(RELAIS6, HIGH);
digitalWrite(RELAIS8, HIGH);
digitalWrite(RELAIS9, HIGH);
digitalWrite(RELAIS10, HIGH);
digitalWrite(RELAIS11, LOW);
digitalWrite(RELAIS12, HIGH);
delay(DAUER);
digitalWrite(RELAIS2, HIGH);
digitalWrite(RELAIS3, HIGH);
digitalWrite(RELAIS4, HIGH);
digitalWrite(RELAIS5, HIGH);
digitalWrite(RELAIS6, LOW);
digitalWrite(RELAIS8, HIGH);
digitalWrite(RELAIS9, HIGH);
digitalWrite(RELAIS10, HIGH);
digitalWrite(RELAIS11, HIGH);
digitalWrite(RELAIS12, LOW);
delay(DAUER);
digitalWrite(RELAIS1, HIGH);
digitalWrite(RELAIS2, HIGH);
digitalWrite(RELAIS3, HIGH);
digitalWrite(RELAIS4, HIGH);
digitalWrite(RELAIS5, HIGH);
digitalWrite(RELAIS6, HIGH);
digitalWrite(RELAIS7, HIGH);
digitalWrite(RELAIS8, HIGH);
digitalWrite(RELAIS9, HIGH);
digitalWrite(RELAIS10, HIGH);
digitalWrite(RELAIS11, HIGH);
digitalWrite(RELAIS12, HIGH);
delay(DAUER);
digitalWrite(RELAIS2, LOW);
digitalWrite(RELAIS3, HIGH);
digitalWrite(RELAIS4, HIGH);
digitalWrite(RELAIS5, HIGH);
digitalWrite(RELAIS6, HIGH);
digitalWrite(RELAIS8, LOW);
digitalWrite(RELAIS9, HIGH);
digitalWrite(RELAIS10, HIGH);
digitalWrite(RELAIS11, HIGH);
digitalWrite(RELAIS12, HIGH);
delay(DAUER);
digitalWrite(RELAIS2, HIGH);
digitalWrite(RELAIS3, LOW);
digitalWrite(RELAIS4, HIGH);
digitalWrite(RELAIS5, HIGH);
digitalWrite(RELAIS6, HIGH);
digitalWrite(RELAIS8, HIGH);
digitalWrite(RELAIS9, LOW);
digitalWrite(RELAIS10, HIGH);
digitalWrite(RELAIS11, HIGH);
digitalWrite(RELAIS12, HIGH);
delay(DAUER);
digitalWrite(RELAIS2, HIGH);
digitalWrite(RELAIS3, HIGH);
digitalWrite(RELAIS4, LOW);
digitalWrite(RELAIS5, HIGH);
digitalWrite(RELAIS6, HIGH);
digitalWrite(RELAIS8, HIGH);
digitalWrite(RELAIS9, HIGH);
digitalWrite(RELAIS10, LOW);
digitalWrite(RELAIS11, HIGH);
digitalWrite(RELAIS12, HIGH);
delay(DAUER);
digitalWrite(RELAIS2, HIGH);
digitalWrite(RELAIS3, HIGH);
digitalWrite(RELAIS4, HIGH);
digitalWrite(RELAIS5, LOW);
digitalWrite(RELAIS6, HIGH);
digitalWrite(RELAIS8, HIGH);
digitalWrite(RELAIS9, HIGH);
digitalWrite(RELAIS10, HIGH);
digitalWrite(RELAIS11, LOW);
digitalWrite(RELAIS12, HIGH);
delay(DAUER);
digitalWrite(RELAIS2, HIGH);
digitalWrite(RELAIS3, HIGH);
digitalWrite(RELAIS4, HIGH);
digitalWrite(RELAIS5, HIGH);
digitalWrite(RELAIS6, LOW);
digitalWrite(RELAIS8, HIGH);
digitalWrite(RELAIS9, HIGH);
digitalWrite(RELAIS10, HIGH);
digitalWrite(RELAIS11, HIGH);
digitalWrite(RELAIS12, LOW);
delay(DAUER);
digitalWrite(RELAIS1, LOW);
digitalWrite(RELAIS2, HIGH);
digitalWrite(RELAIS3, HIGH);
digitalWrite(RELAIS4, HIGH);
digitalWrite(RELAIS5, HIGH);
digitalWrite(RELAIS6, HIGH);
digitalWrite(RELAIS7, LOW);
digitalWrite(RELAIS8, HIGH);
digitalWrite(RELAIS9, HIGH);
digitalWrite(RELAIS10, HIGH);
digitalWrite(RELAIS11, HIGH);
digitalWrite(RELAIS12, HIGH);
delay(WARTEZEIT);
} else {
digitalWrite(RELAIS1,HIGH);
digitalWrite(RELAIS2,HIGH);
digitalWrite(RELAIS3,HIGH);
digitalWrite(RELAIS4,HIGH);
digitalWrite(RELAIS5,HIGH);
digitalWrite(RELAIS6,HIGH);
digitalWrite(RELAIS7,HIGH);
digitalWrite(RELAIS8,HIGH);
digitalWrite(RELAIS9,HIGH);
digitalWrite(RELAIS10,HIGH);
digitalWrite(RELAIS11,HIGH);
digitalWrite(RELAIS12,HIGH);
}
}