Oder Abfrage geht nicht

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 :frowning:

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);
  }
}

( 49 )==HIGH ist immer WAHR, und damit

if (digitalRead (EINTASTER)==HIGH || (EINSCHALTER)==HIGH) 

wird immer ausgefuhrt

Das glaube ich nicht, habe aber gerade keinen Arduino zum Testen.

sollte wohl eher

  if (digitalRead (EINTASTER)==HIGH || digitalRead(EINSCHALTER)==HIGH) {

heißen.

1 Like

vermutlich

So einfach war die Lösung :smiley:
Besten dank ich war echt am verzweifeln....

const byte Anzahl = 12;
const byte RELAIS[Anzahl] = {
  22, //Arduino Pin 23 Hochspannungsblitze
  23, //Arduino Pin 25 Antenne 1
  24, //Arduino Pin 27 Antenne 2
  25, //Arduino Pin 29 Antenne 3
  26, //Arduino Pin 31 Antenne 4
  27, //Arduino Pin 33 Antenne 5
  28, //Arduino Pin 35
  29, //Arduino Pin 37
  30, //Arduino Pin 39
  31, //Arduino Pin 41
  32, //Arduino Pin 43
  33 //Arduino Pin 45
};

#define EINSCHALTER digitalRead(49) //Arduino pin 49 Schalter Animatronic EIN, wenn es eine Taste ist muss Pull-Up haben
#define  EINTASTER digitalRead(51) // Arduino pin 51 Taster Animatronic EIN, wenn es eine Taste ist muss Pull-Up haben
const int WARTEZEIT = 3500;
const int DAUER = 175;

void setup() {
  for (byte i = 0; i < Anzahl; i++)pinMode(RELAIS[i], OUTPUT);
}

void loop() {
  if (EINTASTER || EINSCHALTER) {
    for (byte i = 0; i < Anzahl; i++)digitalWrite(RELAIS[i], HIGH);

    delay(DAUER);
    digitalWrite(RELAIS[1], LOW);
    digitalWrite(RELAIS[7], LOW);

    delay(DAUER);
    digitalWrite(RELAIS[1], HIGH);
    digitalWrite(RELAIS[7], HIGH);
    digitalWrite(RELAIS[2], LOW);
    digitalWrite(RELAIS[8], LOW);

    delay(DAUER);

    ....

    delay(WARTEZEIT);
  } else {
    for (byte i = 0; i < Anzahl; i++)digitalWrite(RELAIS[i], HIGH);
  }
}

mit Port Register Manipulation kann man es noch einfacher gestalten und Ausfuhrung wird dadurch auch noch beschleunigt

Im englischen Teil des Forum müssen die Beiträge und Diskussionen in englischer Sprache verfasst werden.
Deswegen wurde diese Diskussion in den deutschen Teil des Forums verschoben.
mfg ein Moderator.

Ein PORT sind 8 Pins die mittels 3 Register (Ausgangsdaten, Eingengsdaten und eines das sagt ob ein Pin ein Eingang oder Ausgang ist.
Hier eine Erklährung für den Arduino UNO.

Für den MEGA ist es ähnlich, Nur daß er mehr Pins hat und darum mehr Ports zur Verfügung stehen.

Die Entsprechung PORT-Pins findest Du zB hier:

Pin 23 ist zB Port A Bit 1 oder PA1

Die Pinauswahl ist für die Portmanipulation sehr ungünstig, da die Pins auf mindestens 4 Ports verteilt sind. Für 12 Pins genügen eigentlich 2 Ports.

Grüße Uwe

1 Like

Was aber nicht ganz so einfach ist wie man denkt, gerade für Anfänger.

Wokwi finde ich leichter als die Doku und diese richtig zu interpretieren

void setup() {
 Serial.begin(115200);
 Serial.println( ( 49 == HIGH)? " HIGH ist bool und bool hat vorrang":
      "HIGH ist nicht bool oder es wird erst bool-> int gewandelt ");
 Serial.println( (49==true)||(true==49)? "bool hat manchmal Vorrang":
      "Es wird erst bool -> int gewandelt ");
 Serial.println( (49)?  "Aber Wenn nach bool gewandelt wird, ist alles außer 0 true":
      "??");
}

Dein Glaube ist nicht erschüttert, @Whandall.

Wenn ich mich recht erinnere, gibt es ein #define HIGH 1,
und 49 ist nun mal ungleich 1.

2 Likes

Ich arbeite mich noch mit kleineren Projekten in die arduino ide rein deswegen sehen die s
sketches noch etwas wüst aus aber er läuft und das ist das wichtigste:)
das ganze programm soll eine steuerung für eine Halloween Animatronic werden mit mehreren Dingen die nacheinander passieren sollen......


int RELAIS1 = 22; //Relaiskarte Pin 1 Hochspannungsblitze
int RELAIS2 = 23; //Relaiskarte Pin 2 Antenne 1
int RELAIS3 = 24; //Relaiskarte Pin 3 Antenne 2
int RELAIS4 = 25; //Relaiskarte Pin 4 Antenne 3
int RELAIS5 = 26; //Relaiskarte Pin 5 Antenne 4
int RELAIS6 = 27; //Relaiskarte Pin 6 Antenne 5
int RELAIS7 = 28; //Relaiskarte Pin 7 LEER
int RELAIS8 = 29; //Relaiskarte Pin 8 Leuchten X1 & X2
int RELAIS9 = 30; //Relaiskarte Pin 9 Leuchten X3 & X4
int RELAIS10 = 31; //Relaiskarte Pin 10 Leuchten X5 & X6
int RELAIS11 = 32; //Relaiskarte Pin 11 Leuchten X7 & X8
int RELAIS12 = 33; //Relaiskarte Pin 12 Leuchten X9 & X10
int RELAIS13 = 34; //Relaiskarte Pin 13 Soundmodul Hochspannungssummen
int RELAIS14 = 35; //Relaiskarte Pin 14 Soundmodul Puppe
int RELAIS15 = 36; //Relaiskarte Pin 15 Linearantrieb
int RELAIS16 = 37; //Relaiskarte Pin 16 Linearantrieb
int EINSCHALTER = 49; //Arduino Pin 49 Schalter Animatronic EIN
int EINTASTER = 51; // Arduino Pin 51 Taster Animatronic EIN
int WARTEZEIT = 15000; //Aktivzeit der Hochspannungsblitze und des Linearantriebs der Puppe
int DAUER = 175; //Aktivzeit der einzelnen Antennenstraenge
int RUHEPAUSE = 5000; //Zeit Duty Cycle
int PAUSE = 1000; //Pausenzeit
unsigned long seconds = 1000L; //Notice the L 
unsigned long LINEARANTRIEB = seconds * 300; // Ruhezeit zwischen den Animatronic Durchläufen

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(RELAIS13, OUTPUT);
pinMode(RELAIS14, OUTPUT);
pinMode(RELAIS15, OUTPUT);
pinMode(RELAIS16, OUTPUT);
pinMode(EINSCHALTER, INPUT);
pinMode(EINTASTER, INPUT);
}

void loop() {
  if (digitalRead (EINTASTER)==HIGH ||digitalRead (EINSCHALTER)==HIGH) {   //Bedingung für Start der Animatronic Sequenz
    digitalWrite(RELAIS1, HIGH);                                           //Einmal alle Relais auf "0"
    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);
    digitalWrite(RELAIS13, HIGH);
    digitalWrite(RELAIS14, HIGH);
    digitalWrite(RELAIS15, HIGH);
    digitalWrite(RELAIS16,HIGH);
    delay(PAUSE);
    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);
    digitalWrite(RELAIS13, LOW);
    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);
    digitalWrite(RELAIS13,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(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(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(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(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);
    digitalWrite(RELAIS14, 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);
    digitalWrite(RELAIS14, HIGH);
    digitalWrite(RELAIS15, LOW);
    digitalWrite(RELAIS16, LOW);
    delay(WARTEZEIT);
    digitalWrite(RELAIS1, HIGH);
    digitalWrite(RELAIS7, HIGH);
    digitalWrite(RELAIS15, HIGH);
    digitalWrite(RELAIS16, HIGH);
    delay(LINEARANTRIEB);
  } else {                                                                //Kein Startsignal, dann bleiben alle Relais auf "0"
    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);
    digitalWrite(RELAIS13,HIGH);
    digitalWrite(RELAIS14,HIGH);
    digitalWrite(RELAIS15,HIGH);
    digitalWrite(RELAIS16,HIGH);
  }
}

´´´

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.