//Variable für die Tasterabfrage und Zeit in ms für Weichenstromverbindung
const byte activ=200; //Zeit für die Weichenstromversorgung
const byte check=50; //ms zwischen zwei Taster abfragen
//Muster für die Ausgabe
byte Arrayweiche[] = {0, //Weiche 1-4
/*
* Gilt für die erste Null, da diese 8Bit "groß" ist
* Arrayweiche von links betrachtet
* Stelle 1 = Weiche 1 Gerade aus
* Stelle 2 = Weiche 1 abbiegen
* Stelle 3 = Weiche 2 Gerade aus
* Stelle 4 = Weiche 2 abbiegen
* Stelle 5 = Weiche 3 Gerade aus
* Stelle 6 = Weiche 3 abbiegen
* Stelle 7 = Weiche 4 Gerade aus
* Stelle 8 = Weiche 4 abbiegen
* Innerhalb dieses Bytes wird der Taster von LOW auf HIGH stellen
*/
0, //8Bit Weiche 5-8
0, //8Bit Weiche 9-12
0, //8Bit Weiche 13-16
0, //8Bit Weiche 17-20
0,//8Bit Weiche 21-24
0} ; //8Bit Weiche 25-28
byte ArrayLED[] = {0,
/*
* Gilt für die erste Null, da diese 8Bit "groß" ist
* ArrayLED von links betrachtet
* Stelle 1 = Weiche 1 Gerade aus, LED an wenn HIGH
* Stelle 2 = Weiche 1 abbiegen,LED an wenn HIGH
* Stelle 3 = Weiche 2 Gerade aus, LED an, wen HIGH
* Stelle 4 = Weiche 2 abbiegen, LED an wenn HIGH
* Stelle 5 = Weiche 3 Gerade aus, LED an wen HIGH
* Stelle 6 = Weiche 3 abbiegen, LED an wen HIGH
* Stelle 7 = Weiche 4 Gerade aus, LED an wen HIGH
* Stelle 8 = Weiche 4 abbiegen, LED an wen HIGH
* Innerhalb dieses Bytes wird der Taster von LOW auf HIGH stellen
*/
0,
0,
0,
0,
0,
0};
//Taster 1 8 Bit
const byte TST1=A0; //Gerade aus Weiche 1
/*const byte TST2=A1;//abbiegen von Weiche 1
const byte TST3=A2;
const byte TST4=A3;
const byte TST5=A4;
const byte TST6=A5;
const byte TST7=A6;
const byte TST8=A7;
//Tster 2 8Bit
const byte TST9=A8; //Gerade Weiche 5
const byte TST10=A9; //Abbiegen Weiche5
const byte TST11=A10;
const byte TST12=A11;
const byte TST13=A12;
const byte TST14=A13;
const byte TST15=A14;
const byte TST16=A15;
//Taster 3 8 Bit
const byte TST17=0; //Gerade Weiche 9
const byte TST18=1; //Abbiegen Weiche 9
const byte TST19=2;
const byte TST20=3;
const byte TST21=4;
const byte TST22=5;
const byte TST23=6;
const byte TST24=7;
// Taster 4 8Bit
const byte TST25=8; //Gerade Weiche 13
const byte TST26=9; //Abbiegen Weiche 13
const byte TST27=10;
const byte TST28=11;
const byte TST29=12;
const byte TST30=13;
const byte TST31=14;
const byte TST32=15;
//Taster 5 8Bit
const byte TST33=16; //Gerade Weiche 17
const byte TST34=17; //Abbiegen Weiche 17
const byte TST35=18;
const byte TST36=19;
const byte TST37=20;
const byte TST38=21;
const byte TST39=22;
const byte TST40=23;
//Taster 6 8Bit
const byte TST41=24; //Gerade Weiche 21
const byte TST42=25; //Abbiegen Weiche 21
const byte TST43=26;
const byte TST44=27;
const byte TST45=28;
const byte TST46=29;
const byte TST47=30;
const byte TST48=31;
//Taster 7 8Bit
const byte TST49=32; //Gerade Weiche 25
const byte TST50=33; //Abbiegen Weiche 25
const byte TST51=34;
const byte TST52=35;
const byte TST53=36;
const byte TST54=37;
const byte TST55=38;
const byte TST56=39;
*/
//Schieberegister Weichenantrieb
const byte shiftPinw = 40; //Pin verbunden mit SH_CP des 74HC595 (clockpin) Pin 11
const byte storePinw = 41; //Pin verbunden mit ST_CP des 74HC595 (latchpin) Pin 12
const byte dataPinw = 42; //Pin verbunden mit DS des 74HC595 (datapin) Pin 14
const byte oew = 43; //Outputenablepin
const byte mrw = 44; //masterresetpin
//Schieberegister LED Rückeldung
const byte shiftPinl = 45; //Pin verbunden mit SH_CP des 74HC595 Pin 11
const byte storePinl = 46; //Pin verbunden mit ST_CP des 74HC595 Pin 12
const byte dataPinl = 47; //Pin verbunden mit DS des 74HC595 Pin 14
const byte oel = 48;
const byte mrl = 49;
void setup() {
//Taster definition mit internen Pull Up
//TST1
pinMode(TST1,INPUT_PULLUP);
//digitalWrite(TST1,HIGH); überflüssig, weil Pullup wird schon in pinmode aktiviert.
/*
pinMode(TST2,INPUT_PULLUP);
pinMode(TST3,INPUT_PULLUP);
pinMode(TST4,INPUT_PULLUP);
pinMode(TST5,INPUT_PULLUP);
pinMode(TST6,INPUT_PULLUP);
pinMode(TST7,INPUT_PULLUP);
pinMode(TST8,INPUT_PULLUP);
pinMode(TST9,INPUT_PULLUP);
pinMode(TST10,INPUT_PULLUP);
pinMode(TST11,INPUT_PULLUP);
pinMode(TST12,INPUT_PULLUP);
pinMode(TST13,INPUT_PULLUP);
pinMode(TST14,INPUT_PULLUP);
pinMode(TST15,INPUT_PULLUP);
pinMode(TST16,INPUT_PULLUP);
pinMode(TST17,INPUT_PULLUP);
pinMode(TST18,INPUT_PULLUP);
pinMode(TST19,INPUT_PULLUP);
pinMode(TST20,INPUT_PULLUP);
pinMode(TST21,INPUT_PULLUP);
pinMode(TST22,INPUT_PULLUP);
pinMode(TST23,INPUT_PULLUP);
pinMode(TST24,INPUT_PULLUP);
pinMode(TST25,INPUT_PULLUP);
pinMode(TST26,INPUT_PULLUP);
pinMode(TST27,INPUT_PULLUP);
pinMode(TST28,INPUT_PULLUP);
pinMode(TST29,INPUT_PULLUP);
pinMode(TST30,INPUT_PULLUP);
pinMode(TST31,INPUT_PULLUP);
pinMode(TST32,INPUT_PULLUP);
pinMode(TST33,INPUT_PULLUP);
pinMode(TST34,INPUT_PULLUP);
pinMode(TST35,INPUT_PULLUP);
pinMode(TST36,INPUT_PULLUP);
pinMode(TST37,INPUT_PULLUP);
pinMode(TST38,INPUT_PULLUP);
pinMode(TST39,INPUT_PULLUP);
pinMode(TST40,INPUT_PULLUP);
pinMode(TST41,INPUT_PULLUP);
pinMode(TST42,INPUT_PULLUP);
pinMode(TST43,INPUT_PULLUP);
pinMode(TST44,INPUT_PULLUP);
pinMode(TST45,INPUT_PULLUP);
pinMode(TST46,INPUT_PULLUP);
pinMode(TST47,INPUT_PULLUP);
pinMode(TST48,INPUT_PULLUP);
pinMode(TST49,INPUT_PULLUP);
pinMode(TST50,INPUT_PULLUP);
pinMode(TST51,INPUT_PULLUP);
pinMode(TST52,INPUT_PULLUP);
pinMode(TST53,INPUT_PULLUP);
pinMode(TST54,INPUT_PULLUP);
pinMode(TST55,INPUT_PULLUP);
pinMode(TST56,INPUT_PULLUP);
*/
//Schieberegister Weiche
pinMode(shiftPinw,OUTPUT);
pinMode(storePinw,OUTPUT);
pinMode(dataPinw,OUTPUT);
pinMode(oew,OUTPUT);
pinMode(mrw,OUTPUT);
//Schieberegister LED
pinMode(shiftPinl,OUTPUT);
pinMode(storePinl,OUTPUT);
pinMode(dataPinl,OUTPUT);
pinMode(oel,OUTPUT);
pinMode(mrl,OUTPUT);
}
void loop() {
//Taster 1 wird abgefragt und Funktion Taster 1 wird ausgeführt
if(!digitalRead(TST1)){
delay(check);
if(!digitalRead(TST1)){
bitWrite(Arrayweiche[0],7,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],7,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],6,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
/*
//Taster 2 wird abgefragt und Funktion Taster 2 wird ausgeführt
if(!digitalRead(TST2)){
delay(check);
if(!digitalRead(TST2)){
bitWrite(Arrayweiche[0],6,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],7,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],6,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST3)){
delay(check);
if(!digitalRead(TST3)){
bitWrite(Arrayweiche[0],5,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],5,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],4,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST4)){
delay(check);
if(!digitalRead(TST4)){
bitWrite(Arrayweiche[0],4,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],5,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],4,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST5)){
delay(check);
if(!digitalRead(TST5)){
bitWrite(Arrayweiche[0],3,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],3,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],2,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST6)){
delay(check);
if(!digitalRead(TST4)){
bitWrite(Arrayweiche[0],2,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],3,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],2,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST7)){
delay(check);
if(!digitalRead(TST7)){
bitWrite(Arrayweiche[0],1,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],1,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],0,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST8)){
delay(check);
if(!digitalRead(TST8)){
bitWrite(Arrayweiche[0],0,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],1,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],0,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST9)){
delay(check);
if(!digitalRead(TST9)){
bitWrite(Arrayweiche[1],7,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[1],7,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[1],6,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST10)){
delay(check);
if(!digitalRead(TST10)){
bitWrite(Arrayweiche[1],6,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[1],7,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[1],6,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST11)){
delay(check);
if(!digitalRead(TST11)){
bitWrite(Arrayweiche[1],5,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[1],5,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[1],4,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST12)){
delay(check);
if(!digitalRead(TST12)){
bitWrite(Arrayweiche[1],4,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[1],5,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[1],4,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST13)){
delay(check);
if(!digitalRead(TST13)){
bitWrite(Arrayweiche[1],3,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[1],3,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[1],2,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST14)){
delay(check);
if(!digitalRead(TST14)){
bitWrite(Arrayweiche[1],2,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[1],3,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[1],2,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST15)){
delay(check);
if(!digitalRead(TST15)){
bitWrite(Arrayweiche[1],1,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[1],1,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[1],0,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST16)){
delay(check);
if(!digitalRead(TST16)){
bitWrite(Arrayweiche[1],0,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[1],1,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[1],0,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST17)){
delay(check);
if(!digitalRead(TST17)){
bitWrite(Arrayweiche[2],7,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[2],7,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[2],6,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST18)){
delay(check);
if(!digitalRead(TST18)){
bitWrite(Arrayweiche[2],6,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[2],7,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[2],6,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST19)){
delay(check);
if(!digitalRead(TST19)){
bitWrite(Arrayweiche[2],5,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[2],5,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[2],4,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST20)){
delay(check);
if(!digitalRead(TST20)){
bitWrite(Arrayweiche[2],4,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[2],5,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[2],4,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST21)){
delay(check);
if(!digitalRead(TST21)){
bitWrite(Arrayweiche[2],3,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[2],3,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[2],2,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST22)){
delay(check);
if(!digitalRead(TST2)){
bitWrite(Arrayweiche[2],2,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[2],3,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[2],2,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST23)){
delay(check);
if(!digitalRead(TST23)){
bitWrite(Arrayweiche[2],1,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[2],1,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[2],0,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST24)){
delay(check);
if(!digitalRead(TST24)){
bitWrite(Arrayweiche[2],0,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[2],1,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[2],0,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST25)){
delay(check);
if(!digitalRead(TST25)){
bitWrite(Arrayweiche[3],7,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[3],7,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[3],6,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST26)){
delay(check);
if(!digitalRead(TST26)){
bitWrite(Arrayweiche[3],6,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[3],7,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[3],6,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST27)){
delay(check);
if(!digitalRead(TST1)){
bitWrite(Arrayweiche[3],5,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[3],5,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[3],4,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST28)){
delay(check);
if(!digitalRead(TST2)){
bitWrite(Arrayweiche[3],4,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[3],5,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[3],4,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST29)){
delay(check);
if(!digitalRead(TST1)){
bitWrite(Arrayweiche[3],3,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[3],3,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[3],2,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST30)){
delay(check);
if(!digitalRead(TST30)){
bitWrite(Arrayweiche[3],2,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[3],3,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[3],2,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST31)){
delay(check);
if(!digitalRead(TST31)){
bitWrite(Arrayweiche[3],1,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[3],1,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[3],0,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST32)){
delay(check);
if(!digitalRead(TST32)){
bitWrite(Arrayweiche[3],0,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[3],1,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[3],0,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST33)){
delay(check);
if(!digitalRead(TST33)){
bitWrite(Arrayweiche[4],7,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[4],7,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[4],6,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST34)){
delay(check);
if(!digitalRead(TST34)){
bitWrite(Arrayweiche[4],6,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[4],7,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[4],6,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST35)){
delay(check);
if(!digitalRead(TST35)){
bitWrite(Arrayweiche[4],5,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],7,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],6,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST36)){
delay(check);
if(!digitalRead(TST2)){
bitWrite(Arrayweiche[0],6,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],7,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],6,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST37)){
delay(check);
if(!digitalRead(TST1)){
bitWrite(Arrayweiche[0],7,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],7,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],6,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST38)){
delay(check);
if(!digitalRead(TST2)){
bitWrite(Arrayweiche[0],6,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],7,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],6,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST39)){
delay(check);
if(!digitalRead(TST1)){
bitWrite(Arrayweiche[0],7,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],7,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],6,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST40)){
delay(check);
if(!digitalRead(TST2)){
bitWrite(Arrayweiche[0],6,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],7,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],6,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST41)){
delay(check);
if(!digitalRead(TST1)){
bitWrite(Arrayweiche[0],7,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],7,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],6,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST42)){
delay(check);
if(!digitalRead(TST2)){
bitWrite(Arrayweiche[0],6,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],7,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],6,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST43)){
delay(check);
if(!digitalRead(TST2)){
bitWrite(Arrayweiche[0],6,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],7,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],6,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST44)){
delay(check);
if(!digitalRead(TST1)){
bitWrite(Arrayweiche[0],7,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],7,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],6,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST45)){
delay(check);
if(!digitalRead(TST2)){
bitWrite(Arrayweiche[0],6,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],7,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],6,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST46)){
delay(check);
if(!digitalRead(TST1)){
bitWrite(Arrayweiche[0],7,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],7,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],6,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST47)){
delay(check);
if(!digitalRead(TST2)){
bitWrite(Arrayweiche[0],6,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],7,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],6,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST48)){
delay(check);
if(!digitalRead(TST1)){
bitWrite(Arrayweiche[0],7,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],7,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],6,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST49)){
delay(check);
if(!digitalRead(TST1)){
bitWrite(Arrayweiche[0],7,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],7,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],6,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST50)){
delay(check);
if(!digitalRead(TST2)){
bitWrite(Arrayweiche[0],6,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],7,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],6,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST51)){
delay(check);
if(!digitalRead(TST1)){
bitWrite(Arrayweiche[0],7,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],7,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],6,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST52)){
delay(check);
if(!digitalRead(TST2)){
bitWrite(Arrayweiche[0],6,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],7,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],6,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST53)){
delay(check);
if(!digitalRead(TST1)){
bitWrite(Arrayweiche[0],7,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],7,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],6,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST54)){
delay(check);
if(!digitalRead(TST2)){
bitWrite(Arrayweiche[0],6,HIGH); //abbiegen von Weiche 1, also bit 6 da links gezählt
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen des sketches wird auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],7,LOW); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],6,HIGH); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST55)){
delay(check);
if(!digitalRead(TST1)){
bitWrite(Arrayweiche[0],7,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuell0enw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],7,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],6,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
}
if(!digitalRead(TST56)){
delay(check);
if(!digitalRead(TST56)){
bitWrite(Arrayweiche[0],7,HIGH); //Gerade aus von Weiche 1 auf HIGH Stellen, also bit 7, da von Links gezählt wird
Fuellenw(); // schreibt Variable in Schieberegister
delay(activ); //Impuls zum schalten der Weiche
//delay(1000); //zum testen auf 1000ms erhöht
Leerenw(); // setzt alles auf LOW
bitWrite(ArrayLED[0],7,HIGH); //setzt RückmeldungsLED von Gerade aus auf an
bitWrite(ArrayLED[0],6,LOW); //setzt RückmeldungsLED von abbiegen auf aus
Fuellenl();
}
*/
}
}
void Fuellenw() {
digitalWrite(mrw,HIGH);
digitalWrite(oew,HIGH);
digitalWrite(storePinw,LOW);
shiftOut(dataPinw,shiftPinw,MSBFIRST,Arrayweiche[0]); //shiftet von rechts nach links
shiftOut(dataPinw,shiftPinw,MSBFIRST,Arrayweiche[1]);
shiftOut(dataPinw,shiftPinw,MSBFIRST,Arrayweiche[2]);
shiftOut(dataPinw,shiftPinw,MSBFIRST,Arrayweiche[3]);
shiftOut(dataPinw,shiftPinw,MSBFIRST,Arrayweiche[4]);
shiftOut(dataPinw,shiftPinw,MSBFIRST,Arrayweiche[5]);
shiftOut(dataPinw,shiftPinw,MSBFIRST,Arrayweiche[6]);
shiftOut(dataPinw,shiftPinw,MSBFIRST,Arrayweiche[7]);
digitalWrite(storePinw,HIGH);
digitalWrite(oel,LOW);
}
void Fuellenl() {
digitalWrite(mrl,LOW);
delay(5);
digitalWrite(mrl,HIGH);
digitalWrite(oel,HIGH);
digitalWrite(storePinl,LOW);
shiftOut(dataPinl,shiftPinl,MSBFIRST,ArrayLED[0]); //shiftet ArrayLED aus
shiftOut(dataPinl,shiftPinl,MSBFIRST,ArrayLED[1]);
shiftOut(dataPinl,shiftPinl,MSBFIRST,ArrayLED[2]);
shiftOut(dataPinl,shiftPinl,MSBFIRST,ArrayLED[3]);
shiftOut(dataPinl,shiftPinl,MSBFIRST,ArrayLED[4]);
shiftOut(dataPinl,shiftPinl,MSBFIRST,ArrayLED[5]);
shiftOut(dataPinl,shiftPinl,MSBFIRST,ArrayLED[6]);
shiftOut(dataPinl,shiftPinl,MSBFIRST,ArrayLED[7]);
digitalWrite(storePinl, HIGH);
digitalWrite(oel,LOW);
}
void Leerenw(){ //setzt alles Variablen auf LOW, damit keine Dauerspannung an dem Weichenantrieb anliegt.
digitalWrite(oew,HIGH);
digitalWrite (mrw,LOW);
}