5x5x5 LedCube

From S23Wiki
Jump to: navigation, search

5x5x5 Led Cube

5x5x5 LED Cube

<tubelist>8A324D90E80AA231</tubelist>

Juhu der groessere Bruder ist da xD endlich genug Pins um den 5x5x5 komplett anzusteuern

--Talisman 17:38, 28 February 2010 (UTC)

schaltung:

der wuerfel 5x5x5 (5 Anoden 25 Kathoden) jeweils pro ausgang am wuerfel ein pin

3x drehpoti 10k + 1x schiebepoti 1k diese sind jeweils an einen analogen eingang angeschlossen und liefern linearen wert zurueck

zb um das delay einzustellen oder durch die programme zu wechseln

Bauphase:


code:

Binary sketch size: 42494 bytes (of a 126976 byte maximum)

<HighlightSyntax> // constants const int buttonPin1 = 35; const int buttonPin2 = 36; const int buttonPin3 = 37; const int ledPin1 = 5; const int ledPin2 = 6; const int ledPin3 = 7;

// variables int buttonPushCounter1 = 0; int buttonState1 = 0; int lastButtonState1 = 0; int buttonPushCounter2 = 0; int buttonState2 = 0; int lastButtonState2 = 0; int buttonPushCounter3 = 0; int buttonState3 = 0; int lastButtonState3 = 0;

long previousMillis = 0; long interval = 10000;

int incomingByte;

int sensorPin = 0; int sensorValue = 0; int sensorMin = 0; int sensorMax = 1023; int sensorPin2 = 1; int sensorValue2 = 0; int sensorMin2 = 0; int sensorMax2 = 1023; int sensorPin3 = 2; int sensorValue3 = 0; int sensorMin3 = 0; int sensorMax3 = 1023; int sensorPin4 = 3; int sensorValue4 = 0; int sensorMin4 = 0; int sensorMax4 = 1023;

int dif; int PW; int PWR; int R1; int R; int x; int y; int cycle; int a1; int a2; int a3; int a4;

// Anoden der 125 LEDs int anode[] = {

 8, 9, 10, 11, 12};

// 5 Kathodenebenen int ce1[] = { //blau

 22, 23, 24, 25, 26};

int ce2[] = {

 30, 31, 32, 33, 34}; //lila

int ce3[] = {

 38, 39, 40, 41, 42}; //gruen

int ce4[] = {

 46, 47, 48, 49, 50}; //rot

int ce5[] = {

 70, 71, 72, 73, 74};  //gelb

// alle Kathodenebenen int ce[] = {

 22, 23, 24, 25, 26, 30, 31, 32, 33, 34, 38, 39, 40, 41, 42, 46, 47, 48, 49, 50,70, 71, 72, 73, 74}; 

// 5 Kathodenflächen int cf1[] = {

 22, 30, 38, 46, 70};

int cf2[] = {

 23, 31, 39, 47, 71};

int cf3[] = {

 24, 32, 40, 48, 72};

int cf4[] = {

 25, 33, 41, 49, 73}; 

int cf5[] = {

 26, 34, 42, 50, 74};

// alle Kathodenflächen int cf[] = {

 22, 30, 38, 46, 70, 23, 31, 39, 47, 71, 24, 32, 40, 48, 72, 25, 33, 41, 49, 73, 26, 34, 42, 50, 74};


long heartBeatArray[] = {

 50, 100, 15, 1200};

int hbeatIndex = 1; long prevMillis;


void setup() {

 randomSeed(analogRead(15));   //// hier wird random initizialisiert, nicht aendern!!!!
 for (int a = 0; a < 5; a++) {  // Alle Anoden auf OUTPUT
   pinMode(anode[a], OUTPUT); 
 }
 for (int c = 0; c < 25; c++) {         // Alle Kathoden auf OUTPUT
   pinMode(ce[c], OUTPUT);
   digitalWrite(ce[c], HIGH);     // Alles ausstellen
 }
 pinMode(buttonPin1, INPUT);
 pinMode(ledPin1, OUTPUT);
 pinMode(buttonPin2, INPUT);
 pinMode(ledPin2, OUTPUT);
 pinMode(buttonPin3, INPUT);
 pinMode(ledPin3, OUTPUT);
 Serial.begin(9600);
 PWR = random(1,27);
 cycle = 0;

}

void loop() {


 sensorValue = analogRead(sensorPin); 
 sensorValue = map(sensorValue, sensorMin, sensorMax, 0, 1023);
 sensorValue = constrain(sensorValue, 0, 1023);
 sensorValue2 = analogRead(sensorPin2); 
 sensorValue2 = map(sensorValue2, sensorMin2, sensorMax2, 0, 5);
 sensorValue2 = constrain(sensorValue2, 0, 5);
 sensorValue3 = analogRead(sensorPin3); 
 sensorValue3 = map(sensorValue3, sensorMin3, sensorMax3, 0, 1023);
 sensorValue3 = constrain(sensorValue3, 0, 1023);
 sensorValue4 = analogRead(sensorPin4); 
 sensorValue4 = map(sensorValue4, sensorMin4, sensorMax4, 0, 27);
 sensorValue4 = constrain(sensorValue4, 0, 27);
 buttons();


 x = sensorValue2;
 if (buttonPushCounter3 == 0) {
   PW = (buttonPushCounter1); 
 }
 if (buttonPushCounter3 == 1) {
   dif = millis() - previousMillis;
   if (millis() - previousMillis > interval) {
     previousMillis = millis(); 
     cycle++;  
     PWR = random(1,32);
     Serial.println("on");
     Serial.print("PWR ist :  ");
     Serial.println(PWR, DEC); 
     Serial.print("sensorValue ist :  ");
     Serial.println(sensorValue, DEC); 
     Serial.print("sensorValue2 ist :  ");
     Serial.println(sensorValue2, DEC); 
     Serial.print("sensorValue3 ist :  ");
     Serial.println(sensorValue3, DEC);   
     Serial.print("sensorValue4 ist :  ");
     Serial.println(sensorValue4, DEC); 
     Serial.print("previousMillis ist :  ");
     Serial.println(previousMillis, DEC);   
     Serial.print("dif ist :  ");
     Serial.println(dif, DEC);  
     Serial.print("cycle ist :  ");
     Serial.println(cycle, DEC);    
   }
   //      else {
   //      PWR = random(1,27);
   PW = PWR;
 }
 if (buttonPushCounter3 == 2) {
   if (Serial.available() > 0) {
     incomingByte = Serial.read();
     if (incomingByte == 'h') {
       PW = random(1,32);
     } 
   } 
 }
 switch (PW) 
 {
 case 0:
   ///spielplatz 




   //// ende spielplatz
   break;
 case 1:
   fa1random();
   break;
 case 2:
   ff1random();
   break;
 case 3:
   R = random(1, 3);
   switch(R){
   case 1:
     fa1random();
     break;
   case 2:
     ff1random();
     break;
   }
   break;
 case 4:
   fa2random();
   break;
 case 5:
   ff2random();
   break;
 case 6:
   R = random(1, 3);
   switch(R){
   case 1:
     fa2random();
     break;
   case 2:
     ff2random();
     break;
   }
   break;
 case 7:
   R = random(1, 5);
   switch(R){
   case 1:
     fa1random();
     break;
   case 2:
     ff2random();
     break;
   case 3:
     fa1random();
     break;
   case 4:
     ff2random();
     break;
   }
   break;
 case 8:
   x = sensorValue2;
   R = random(0, 3);
   switch (R){
   case 0:
     ebene(random(1, 6),random(1, 6),x);
     break;
   case 1:
     flaeche(random(1, 6),random(1, 6),x);
     break;
   case 2:
     reihe(random(1, 26),0,x);
     break;
   }
   break;
 case 9:
   x = sensorValue2;
   reihe(random(1, 26),random(1, 6),x);
   break;
 case 10:
   x = sensorValue2;
   R = random(0, 7);
   switch (R){
   case 0:
     reihe(random(1, 26),random(1, 6),x);
     break;
   case 1:
     ebene(random(1, 6),random(1, 6),x);
     break;
   case 2:
     flaeche(random(1, 6),random(1, 6),x);
     break;
   case 3:
     reihe(random(1, 26),0,x);
     break;
   case 4:
     ebene(random(1, 6),0,x);
     break;
   case 5:
     flaeche(random(1, 6),0,x);
     break;
   case 6:
     reihe(0,random(1, 6),x);
     break;
   }


   break;   
 case 11:
   heartBeat(1.0);
 case 12:
   ///////
   flaeche(1,1,x);
   flaeche(2,2,x);
   flaeche(3,3,x);
   flaeche(4,4,x);
   flaeche(5,5,x);
   aus();
   flaeche(5,5,x);
   flaeche(4,4,x);
   flaeche(3,3,x);
   flaeche(2,2,x);
   flaeche(1,1,x);
   aus();
   flaeche(5,1,x);
   flaeche(4,2,x);
   flaeche(3,3,x);
   flaeche(2,4,x);
   flaeche(1,5,x);
   aus();
   flaeche(1,5,x);
   flaeche(2,4,x);
   flaeche(3,3,x);
   flaeche(4,2,x);
   flaeche(5,1,x);
   aus();


   ebene(1,1,x);
   ebene(2,2,x);
   ebene(3,3,x);
   ebene(4,4,x);
   ebene(5,5,x);
   aus();
   ebene(5,5,x);
   ebene(4,4,x);
   ebene(3,3,x);
   ebene(2,2,x);
   ebene(1,1,x);
   aus();
   ebene(5,1,x);
   ebene(4,2,x);
   ebene(3,3,x);
   ebene(2,4,x);
   ebene(1,5,x);
   aus();
   ebene(1,5,x);
   ebene(2,4,x);
   ebene(3,3,x);
   ebene(4,2,x);
   ebene(5,1,x);
   aus();
   ///////
   break;    
 case 13:
   x = sensorValue2;
   reihe(0,2,x);
   flaeche(2,0,x);
   ebene(2,0,x);
   reihe(0,4,x);
   flaeche(4,0,x);
   ebene(4,0,x);
   break;
 case 14:
   x = sensorValue2;
   R = random(1, 7);
   switch (R){
   case 1:
     reihe(0,1,x);
     aus();
     break;
   case 2:
     flaeche(1,0,x);
     break;
   case 3:
     ebene(1,0,x);
     break;
   case 4:
     reihe(0,5,x);
     break;
   case 5:
     flaeche(5,0,x);
     break;
   case 6:
     ebene(5,0,x);
     break;
   }


   break;
 case 15:
   x = sensorValue2;
   lauflicht1();
   break;
 case 16:
   x = sensorValue2;
   lauflicht2();
   break;
 case 17:
   x = sensorValue2;
   lauflicht3();
   break;
 case 18:
   x = sensorValue2;
   lauflicht4();
   break;
 case 19:
   x = sensorValue2;
   lauflicht1();
   lauflicht2();
   break;
 case 20:
   x = sensorValue2;
   lauflicht3();
   lauflicht4();
   break;
 case 21:  
   x = sensorValue2;
   R = random(1, 5);
   switch (R){ 
   case 1:
     lauflicht1();
     d1();
     break;
   case 2:
     lauflicht2();
     d1();
     break;
   case 3:
     lauflicht3();
     d1();
     break;
   case 4:
     lauflicht4();
     d1();
     break;
   }
   break;
 case 22:
   heartBeat(1.0);
   break;
 case 23:
   ///////
   x = sensorValue2;  
   flaeche(1,1,x);
   flaeche(2,2,x);
   flaeche(3,3,x);
   flaeche(4,4,x);
   flaeche(5,5,x);
   aus();
   flaeche(5,5,x);
   flaeche(4,4,x);
   flaeche(3,3,x);
   flaeche(2,2,x);
   flaeche(1,1,x);
   aus();
   flaeche(5,1,x);
   flaeche(4,2,x);
   flaeche(3,3,x);
   flaeche(2,4,x);
   flaeche(1,5,x);
   aus();
   flaeche(1,5,x);
   flaeche(2,4,x);
   flaeche(3,3,x);
   flaeche(4,2,x);
   flaeche(5,1,x);
   aus();


   ebene(1,1,x);
   ebene(2,2,x);
   ebene(3,3,x);
   ebene(4,4,x);
   ebene(5,5,x);
   aus();
   ebene(5,5,x);
   ebene(4,4,x);
   ebene(3,3,x);
   ebene(2,2,x);
   ebene(1,1,x);
   aus();
   ebene(5,1,x);
   ebene(4,2,x);
   ebene(3,3,x);
   ebene(2,4,x);
   ebene(1,5,x);
   aus();
   ebene(1,5,x);
   ebene(2,4,x);
   ebene(3,3,x);
   ebene(4,2,x);
   ebene(5,1,x);
   aus();
   reihe(1,0,x);
   reihe(7,0,x);
   reihe(13,0,x);
   reihe(19,0,x);
   reihe(25,0,x);
   aus();
   reihe(25,0,x);
   reihe(19,0,x);
   reihe(13,0,x);
   reihe(7,0,x);
   reihe(1,0,x);
   aus();
   reihe(5,0,x);
   reihe(9,0,x);
   reihe(13,0,x);
   reihe(17,0,x);
   reihe(21,0,x);
   aus();
   reihe(21,0,x);
   reihe(17,0,x);
   reihe(13,0,x);
   reihe(9,0,x);
   reihe(5,0,x);
   aus();
   break;


 case 24:
   a4 = sensorValue2;
   for (a3 = 1; a3 < 6; a3++) {
     for (a2 = 1; a2 < 6; a2++) { 
       led(a2,a2,a3,a4);
       led(a2,a3,a2,a4);
       led(a3,a2,a2,a4);
     }
     for (a2 = 5; a2 > 0; a2--) { 
       led(a2,a2,a3,a4);
       led(a2,a3,a2,a4);
       led(a3,a2,a2,a4);
     }    
   }  
   for (a3 = 5; a3 > 0; a3--) {
     for (a2 = 1; a2 < 6; a2++) { 
       led(a2,a2,a3,a4);
       led(a2,a3,a2,a4);
       led(a3,a2,a2,a4);
     }
     for (a2 = 5; a2 > 0; a2--) { 
       led(a2,a2,a3,a4);
       led(a2,a3,a2,a4);
       led(a3,a2,a2,a4);
     }    
   } 
   break;
 case 25:


   a4 = sensorValue2;
   a3 = 0;
   for (a2 = 1; a2 < 6; a2++) { 
     led(a2,a2,a3,a4);
     led(a2,a3,a2,a4);
     led(a3,a2,a2,a4);
   }
   for (a2 = 5; a2 > 0; a2--) { 
     led(a2,a2,a3,a4);
     led(a2,a3,a2,a4);
     led(a3,a2,a2,a4);
   }   
   break;
 case 26:
   a4 = sensorValue2;
   for (a1 = 1; a1 < 6; a1++) {
     led(a1,0,0,a4);
     led(0,a1,0,a4);
   }
   for (a1 = 5; a1 > 0; a1--) {
     led(a1,0,0,a4);
     led(0,a1,0,a4);
   }
   for (a1 = 1; a1 < 6; a1++) {
     led(0,a1,0,a4);
     led(a1,0,0,a4);
   }
   for (a1 = 5; a1 > 0; a1--) {
     led(0,a1,0,a4);
     led(a1,0,0,a4);
   } 
   break;
 case 27:
   a4 = sensorValue2;
   a3 = 0;
   a2 = 0;
   for (a1 = 1; a1 < 6; a1++) { 
     led(a1,a2,a3,a4);
   }
   for (a1 = 5; a1 > 0; a1--) { 
     led(a1,a2,a3,a4);
   }   
   a1 = 0;
   a3 = 0;
   for (a2 = 1; a2 < 6; a2++) { 
     led(a1,a2,a3,a4);
   }
   for (a2 = 5; a2 > 0; a2--) { 
     led(a1,a2,a3,a4);
   }  
   break;
 case 28:
   a4 = sensorValue2;
   //links oben vorne-> rechts unten hinten 
   a2 = 1;
   a3 = 1;
   for (a1 = 1; a1 < 6; a1++ | a2++ | a3++) {  
     led(a1,a2,a3,a4);
   }
   //rechts unten hinten -> links oben vorne
   a2 = 5;
   a3 = 5;
   for (a1 = 5; a1 > 0; a1-- | a2-- | a3--) {  
     led(a1,a2,a3,a4);
   }
   //rechts oben vorne-> links unten hinten 
   a2 = 1;
   a3 = 1;
   for (a1 = 5; a1 > 0; a1-- | a2++ | a3++) {  
     led(a1,a2,a3,a4);
   }
   //links unten hinten -> rechts oben vorne
   a2 = 5;
   a3 = 5;
   for (a1 = 1; a1 < 6; a1++ | a2-- | a3--) {  
     led(a1,a2,a3,a4);
   }
   //rechts oben hinten -> links unten vorne 
   a2 = 1;
   a3 = 5;
   for (a1 = 5; a1 > 0; a1-- | a2++ | a3--) {  
     led(a1,a2,a3,a4);
   }
   //links unten vorne -> rechts oben hinten   
   a2 = 5;
   a3 = 1;
   for (a1 = 1; a1 < 6; a1++ | a2-- | a3++) {  
     led(a1,a2,a3,a4);
   }
   //links oben hinten -> rechts unten vorne 
   a2 = 1;
   a3 = 5;
   for (a1 = 1; a1 < 6; a1++ | a2++ | a3--) {  
     led(a1,a2,a3,a4);
   }
   //rechts unten vorne -> links oben hinten 
   a2 = 5;
   a3 = 1;
   for (a1 = 5; a1 > 0; a1-- | a2-- | a3++) {  
     led(a1,a2,a3,a4);
   }


   break;
 case 29:
   a4 = sensorValue2;
   R = random(1,9);
   switch (R){
   case 1: 
     a2 = 1;
     a3 = 1;
     for (a1 = 1; a1 < 6; a1++ | a2++ | a3++) {  
       led(a1,a2,a3,a4);
     }
     break;
   case 2:
     //rechts unten hinten -> links oben vorne
     a2 = 5;
     a3 = 5;
     for (a1 = 5; a1 > 0; a1-- | a2-- | a3--) {  
       led(a1,a2,a3,a4);
     }
     break;
   case 3:
     //rechts oben vorne-> links unten hinten 
     a2 = 1;
     a3 = 1;
     for (a1 = 5; a1 > 0; a1-- | a2++ | a3++) {  
       led(a1,a2,a3,a4);
     }
     break;
   case 4:
     //links unten hinten -> rechts oben vorne
     a2 = 5;
     a3 = 5;
     for (a1 = 1; a1 < 6; a1++ | a2-- | a3--) {  
       led(a1,a2,a3,a4);
     }
     break;
   case 5:
     //rechts oben hinten -> links unten vorne 
     a2 = 1;
     a3 = 5;
     for (a1 = 5; a1 > 0; a1-- | a2++ | a3--) {  
       led(a1,a2,a3,a4);
     }
     break;
   case 6:
     //links unten vorne -> rechts oben hinten   
     a2 = 5;
     a3 = 1;
     for (a1 = 1; a1 < 6; a1++ | a2-- | a3++) {  
       led(a1,a2,a3,a4);
     }
     break;
   case 7:
     //links oben hinten -> rechts unten vorne 
     a2 = 1;
     a3 = 5;
     for (a1 = 1; a1 < 6; a1++ | a2++ | a3--) {  
       led(a1,a2,a3,a4);
     }
     break;
   case 8:
     //rechts unten vorne -> links oben hinten 
     a2 = 5;
     a3 = 1;
     for (a1 = 5; a1 > 0; a1-- | a2-- | a3++) {  
       led(a1,a2,a3,a4);
     }
   }
   break;
 case 30:
   a4 = sensorValue2;
   a1 = 1;
   for (a1 = 1; a1 < 6; a1++) { 
     ebene(1,a1,a4);
     flaeche(1,a1,a4);
     ebene(5,a1,a4);
     flaeche(5,a1,a4);
     aus();
   }
   for (a1 = 5; a1 > 0; a1--) { 
     ebene(1,a1,a4);
     flaeche(1,a1,a4);
     ebene(5,a1,a4);
     flaeche(5,a1,a4);
     aus();
   }
   break;
 case 31:
   a4 = sensorValue2;
   a1 = random(1, 6);
   ebene(1,a1,a4);
   flaeche(1,a1,a4);
   ebene(5,a1,x);
   flaeche(5,a1,a4);
   break;
 case 40:
   /////s23org
   reihea(4,5);
   d1();
   aus();
   reihea(4,4);
   d1();
   aus();
   reihea(4,3);
   d1();
   aus();
   reihea(4,2);
   d1();
   aus();
   reihea(4,1);
   d1();
   aus();
   reihea(4,0);
   d1();
   delay(sensorValue2);
   aus();
   reihea(4,1);
   d1();
   aus();
   reihea(4,2);
   d1();
   aus();
   reihea(4,3);
   d1();
   aus();
   reihea(4,4);
   d1();
   aus();
   reihea(4,5);
   d1();
   aus();
   reihea(4,5);
   d1();
   aus();
   reihea(4,4);
   d1();
   aus();
   reihea(4,3);
   d1();
   aus();
   reihea(4,2);
   d1();
   aus();
   reihea(4,1);
   d1();
   aus();
   reihea(4,0);
   d1();
   delay(sensorValue2);
   aus();
   reihea(4,1);
   d1();
   aus();
   reihea(4,2);
   d1();
   aus();
   reihea(4,3);
   d1();
   aus();
   reihea(4,4);
   d1();
   aus();
   reihea(4,5);
   d1();
   aus();
   reihea(4,5);
   d1();
   aus();
   reihea(4,4);
   d1();
   aus();
   reihea(4,3);
   d1();
   aus();
   reihea(4,2);
   d1();
   aus();
   reihea(4,1);
   d1();
   aus();
   reihea(4,0);
   d1();
   delay(sensorValue2);
   aus();
   reihea(4,1);
   d1();
   aus();
   reihea(4,2);
   d1();
   aus();
   reihea(4,3);
   d1();
   aus();
   reihea(4,4);
   d1();
   aus();
   reihea(4,5);
   d1();
   aus();
   reihea(5,5);
   d1();
   aus();
   reihea(5,4);
   d1();
   aus();
   reihea(5,3);
   d1();
   aus();
   reihea(5,2);
   d1();
   aus();
   reihea(5,1);
   d1();
   aus();
   reihea(5,0);
   d1();
   delay(sensorValue2);
   aus();
   reihea(5,1);
   d1();
   aus();
   reihea(5,2);
   d1();
   aus();
   reihea(5,3);
   d1();
   aus();
   reihea(5,4);
   d1();
   aus();
   reihea(5,5);
   d1();
   aus();


   reihea(1,5);
   d1();
   aus();
   reihea(1,4);
   d1();
   aus();
   reihea(1,3);
   d1();
   aus();
   reihea(1,2);
   d1();
   aus();
   reihea(1,1);
   d1();
   aus();
   reihea(1,0);
   d1();
   delay(sensorValue2);
   aus();
   reihea(1,1);
   d1();
   aus();
   reihea(1,2);
   d1();
   aus();
   reihea(1,3);
   d1();
   aus();
   reihea(1,4);
   d1();
   aus();
   reihea(1,5);
   d1();
   aus();
   reihea(3,5);
   d1();
   aus();
   reihea(3,4);
   d1();
   aus();
   reihea(3,3);
   d1();
   aus();
   reihea(3,2);
   d1();
   aus();
   reihea(3,1);
   d1();
   aus();
   reihea(3,0);
   d1();
   delay(sensorValue2);
   aus();
   reihea(3,1);
   d1();
   aus();
   reihea(3,2);
   d1();
   aus();
   reihea(3,3);
   d1();
   aus();
   reihea(3,4);
   d1();
   aus();
   reihea(3,5);
   d1();
   aus();
   reihea(2,5);
   d1();
   aus();
   reihea(2,4);
   d1();
   aus();
   reihea(2,3);
   d1();
   aus();
   reihea(2,2);
   d1();
   aus();
   reihea(2,1);
   d1();
   aus();
   reihea(2,0);
   d1();
   delay(sensorValue2);
   aus();
   reihea(2,1);
   d1();
   aus();
   reihea(2,2);
   d1();
   aus();
   reihea(2,3);
   d1();
   aus();
   reihea(2,4);
   d1();
   aus();
   reihea(2,5);
   d1();
   aus();
   reihea(5,5);
   d1();
   aus();
   reihea(5,4);
   d1();
   aus();
   reihea(5,3);
   d1();
   aus();
   reihea(5,2);
   d1();
   aus();
   reihea(5,1);
   d1();
   aus();
   reihea(5,0);
   d1();
   delay(sensorValue2);
   aus();
   reihea(5,1);
   d1();
   aus();
   reihea(5,2);
   d1();
   aus();
   reihea(5,3);
   d1();
   aus();
   reihea(5,4);
   d1();
   aus();
   reihea(5,5);
   d1();
   aus();
   reihea(6,5);
   d1();
   aus();
   reihea(6,4);
   d1();
   aus();
   reihea(6,3);
   d1();
   aus();
   reihea(6,2);
   d1();
   aus();
   reihea(6,1);
   d1();
   aus();
   reihea(6,0);
   d1();
   delay(sensorValue2);
   aus();
   reihea(6,1);
   d1();
   aus();
   reihea(6,2);
   d1();
   aus();
   reihea(6,3);
   d1();
   aus();
   reihea(6,4);
   d1();
   aus();
   reihea(6,5);
   d1();
   aus();
   reihea(7,5);
   d1();
   aus();
   reihea(7,4);
   d1();
   aus();
   reihea(7,3);
   d1();
   aus();
   reihea(7,2);
   d1();
   aus();
   reihea(7,1);
   d1();
   aus();
   reihea(7,0);
   d1();
   delay(sensorValue2);
   aus();
   reihea(7,1);
   d1();
   aus();
   reihea(7,2);
   d1();
   aus();
   reihea(7,3);
   d1();
   aus();
   reihea(7,4);
   d1();
   aus();
   reihea(7,5);
   d1();
   aus();
   reihea(8,5);
   d1();
   aus();
   reihea(8,4);
   d1();
   aus();
   reihea(8,3);
   d1();
   aus();
   reihea(8,2);
   d1();
   aus();
   reihea(8,1);
   d1();
   aus();
   reihea(8,0);
   d1();
   delay(sensorValue2);
   aus();
   reihea(8,1);
   d1();
   aus();
   reihea(8,2);
   d1();
   aus();
   reihea(8,3);
   d1();
   aus();
   reihea(8,4);
   d1();
   aus();
   reihea(8,5);
   d1();
   aus();
   //////
   break;
 default: 
   aus();
   break;
 }  
 int PW2;
 //  PW2 = (sensorValue3);
 PW2 = (buttonPushCounter2);
 switch (PW2) 
 {
 case 0:
   break;    
 case 1:
   f1();
   break;
 case 2:
   f2();
   break;
 case 3:
   f1(); 
   f2();
   break;
 case 4:
   f1(); 
   f2();
   f2();
   f1();
   break;
 case 5:
   R = random(1, 3);
   switch (R){
   case 1:
     f1();
     break;
   case 2:
     f2();
     break;
   }
   break;
 default:
   aus();
   break;
 }

}

///////////////////////////////// ///// void zone!!!!!///////////// ///// void zone!!!!!///////////// ///// void zone!!!!!///////////// ////////////////////////////////

void aus2(){

 //  aus();

} void d1(){

 delay(sensorValue);
 sensorValue = analogRead(sensorPin);
 sensorValue2 = analogRead(sensorPin2); 
 sensorValue3 = analogRead(sensorPin3);
 sensorValue4 = analogRead(sensorPin4); 
 buttons();
 x = sensorValue2; 

}

void anaus(int x) { //liefert 0 aus(); 1 an(); 2 null; 3 aus(delay); oder 4 zufall zurueck

 switch (x){
 case 0:
   aus();
   break;
 case 1:
   an();
   break; 
 case 2:
   break;
 case 3:
   aus();
   delay(500);
   break;
 case 4:
   R =  random (1, 4);
   switch (R){
   case 1:
     an();
     break;
   case 2:
     aus();
     break;
   case 3:
     break;
   }
   break; 
 }

} void heartBeat(float tempo){

 if ((millis() - prevMillis) > (long)(heartBeatArray[hbeatIndex] * tempo)){
   hbeatIndex++;
   if (hbeatIndex > 3) hbeatIndex = 0;
   if ((hbeatIndex % 2) == 0){ 
     an();
     delay((int)heartBeatArray[hbeatIndex]) ;   
     aus(); 
   }
   hbeatIndex++;
   prevMillis = millis();
 }

}


void led(int a, int b, int c, int d){

 switch (c){
 case 0:
   digitalWrite(8,HIGH);
   digitalWrite(9,HIGH);
   digitalWrite(10,HIGH);
   digitalWrite(11,HIGH);
   digitalWrite(12,HIGH);
   break;
 case 1:
   digitalWrite(8,HIGH);
   digitalWrite(9,LOW);
   digitalWrite(10,LOW);
   digitalWrite(11,LOW);
   digitalWrite(12,LOW);
   break;    
 case 2:
   digitalWrite(8,LOW);
   digitalWrite(9,HIGH);
   digitalWrite(10,LOW);
   digitalWrite(11,LOW);
   digitalWrite(12,LOW);
   break;
 case 3:
   digitalWrite(8,LOW);
   digitalWrite(9,LOW);
   digitalWrite(10,HIGH);
   digitalWrite(11,LOW);
   digitalWrite(12,LOW);
   break;   
 case 4:
   digitalWrite(8,LOW);
   digitalWrite(9,LOW);
   digitalWrite(10,LOW);
   digitalWrite(11,HIGH);
   digitalWrite(12,LOW);
   break;    
 case 5:
   digitalWrite(8,LOW);
   digitalWrite(9,LOW);
   digitalWrite(10,LOW);
   digitalWrite(11,LOW);
   digitalWrite(12,HIGH);
   break;  
 default:
   heartBeat(1.0); 
   break;	
 }
 switch (b){
 case 0:
   switch (a) {
   case 1:
     digitalWrite(22,LOW);
     digitalWrite(30,LOW);
     digitalWrite(38,LOW);
     digitalWrite(46,LOW);
     digitalWrite(70,LOW);
     break;
   case 2:
     digitalWrite(23,LOW);
     digitalWrite(31,LOW);
     digitalWrite(39,LOW);
     digitalWrite(47,LOW);
     digitalWrite(71,LOW);
     break;
   case 3:
     digitalWrite(24,LOW);
     digitalWrite(32,LOW);
     digitalWrite(40,LOW);
     digitalWrite(48,LOW);
     digitalWrite(72,LOW);
     break;
   case 4:
     digitalWrite(25,LOW);
     digitalWrite(33,LOW);
     digitalWrite(41,LOW);
     digitalWrite(49,LOW);
     digitalWrite(73,LOW);
     break;
   case 5:
     digitalWrite(26,LOW);
     digitalWrite(34,LOW);
     digitalWrite(42,LOW);
     digitalWrite(50,LOW);
     digitalWrite(74,LOW);
     break;
   default:
     heartBeat(1.0); 
     break;
   }
   break;
 case 1:
   switch (a) {
   case 0:
     digitalWrite(22,LOW);
     digitalWrite(23,LOW);
     digitalWrite(24,LOW);
     digitalWrite(25,LOW);
     digitalWrite(26,LOW);
     break;
   case 1:
     digitalWrite(22,LOW);
     digitalWrite(23,HIGH);
     digitalWrite(24,HIGH);
     digitalWrite(25,HIGH);
     digitalWrite(26,HIGH);
     break;
   case 2:
     digitalWrite(22,HIGH);
     digitalWrite(23,LOW);
     digitalWrite(24,HIGH);
     digitalWrite(25,HIGH);
     digitalWrite(26,HIGH);
     break;
   case 3:
     digitalWrite(22,HIGH);
     digitalWrite(23,HIGH);
     digitalWrite(24,LOW);
     digitalWrite(25,HIGH);
     digitalWrite(26,HIGH);
     break;
   case 4:
     digitalWrite(22,HIGH);
     digitalWrite(23,HIGH);
     digitalWrite(24,HIGH);
     digitalWrite(25,LOW);
     digitalWrite(26,HIGH);
     break;
   case 5:
     digitalWrite(22,HIGH);
     digitalWrite(23,HIGH);
     digitalWrite(24,HIGH);
     digitalWrite(25,HIGH);
     digitalWrite(26,LOW);
     break;
   default:
     heartBeat(1.0); 
     break;
   }
   break;
 case 2:
   switch (a) {
   case 0:
     digitalWrite(30,LOW);
     digitalWrite(31,LOW);
     digitalWrite(32,LOW);
     digitalWrite(33,LOW);
     digitalWrite(34,LOW);
     break;
   case 1:
     digitalWrite(30,LOW);
     digitalWrite(31,HIGH);
     digitalWrite(32,HIGH);
     digitalWrite(33,HIGH);
     digitalWrite(34,HIGH);
     break;
   case 2:
     digitalWrite(30,HIGH);
     digitalWrite(31,LOW);
     digitalWrite(32,HIGH);
     digitalWrite(33,HIGH);
     digitalWrite(34,HIGH);
     break;
   case 3:
     digitalWrite(30,HIGH);
     digitalWrite(31,HIGH);
     digitalWrite(32,LOW);
     digitalWrite(33,HIGH);
     digitalWrite(34,HIGH);
     break;
   case 4:
     digitalWrite(30,HIGH);
     digitalWrite(31,HIGH);
     digitalWrite(32,HIGH);
     digitalWrite(33,LOW);
     digitalWrite(34,HIGH);
     break;
   case 5:
     digitalWrite(30,HIGH);
     digitalWrite(31,HIGH);
     digitalWrite(32,HIGH);
     digitalWrite(33,HIGH);
     digitalWrite(34,LOW);
     break;
   default:
     heartBeat(1.0); 
     break; 
   }
   break;
 case 3:
   switch (a) {
   case 0:
     digitalWrite(38,LOW);
     digitalWrite(39,LOW);
     digitalWrite(40,LOW);
     digitalWrite(41,LOW);
     digitalWrite(42,LOW);
     break;
   case 1:
     digitalWrite(38,LOW);
     digitalWrite(39,HIGH);
     digitalWrite(40,HIGH);
     digitalWrite(41,HIGH);
     digitalWrite(42,HIGH);
     break;
   case 2:
     digitalWrite(38,HIGH);
     digitalWrite(39,LOW);
     digitalWrite(40,HIGH);
     digitalWrite(41,HIGH);
     digitalWrite(42,HIGH);
     break;
   case 3:
     digitalWrite(38,HIGH);
     digitalWrite(39,HIGH);
     digitalWrite(40,LOW);
     digitalWrite(41,HIGH);
     digitalWrite(42,HIGH);
     break;
   case 4:
     digitalWrite(38,HIGH);
     digitalWrite(39,HIGH);
     digitalWrite(40,HIGH);
     digitalWrite(41,LOW);
     digitalWrite(42,HIGH);
     break;
   case 5:
     digitalWrite(38,HIGH);
     digitalWrite(39,HIGH);
     digitalWrite(40,HIGH);
     digitalWrite(41,HIGH);
     digitalWrite(42,LOW);
     break;
   default:
     heartBeat(1.0); 
     break;
   }
   break;
 case 4:
   switch (a) {
   case 0:
     digitalWrite(46,LOW);
     digitalWrite(47,LOW);
     digitalWrite(48,LOW);
     digitalWrite(49,LOW);
     digitalWrite(50,LOW);
     break;
   case 1:
     digitalWrite(46,LOW);
     digitalWrite(47,HIGH);
     digitalWrite(48,HIGH);
     digitalWrite(49,HIGH);
     digitalWrite(50,HIGH);
     break;
   case 2:
     digitalWrite(46,HIGH);
     digitalWrite(47,LOW);
     digitalWrite(48,HIGH);
     digitalWrite(49,HIGH);
     digitalWrite(50,HIGH);
     break;
   case 3:
     digitalWrite(46,HIGH);
     digitalWrite(47,HIGH);
     digitalWrite(48,LOW);
     digitalWrite(49,HIGH);
     digitalWrite(50,HIGH);
     break;
   case 4:
     digitalWrite(46,HIGH);
     digitalWrite(47,HIGH);
     digitalWrite(48,HIGH);
     digitalWrite(49,LOW);
     digitalWrite(50,HIGH);
     break;
   case 5:
     digitalWrite(46,HIGH);
     digitalWrite(47,HIGH);
     digitalWrite(48,HIGH);
     digitalWrite(49,HIGH);
     digitalWrite(50,LOW);
     break;
   default:
     heartBeat(1.0); 
     break; 
   }
   break;
 case 5:
   switch (a) {
   case 0:
     digitalWrite(70,LOW);
     digitalWrite(71,LOW);
     digitalWrite(72,LOW);
     digitalWrite(73,LOW);
     digitalWrite(74,LOW);
     break;
   case 1:
     digitalWrite(70,LOW);
     digitalWrite(71,HIGH);
     digitalWrite(72,HIGH);
     digitalWrite(73,HIGH);
     digitalWrite(74,HIGH);
     break;
   case 2:
     digitalWrite(70,HIGH);
     digitalWrite(71,LOW);
     digitalWrite(72,HIGH);
     digitalWrite(73,HIGH);
     digitalWrite(74,HIGH);
     break;
   case 3:
     digitalWrite(70,HIGH);
     digitalWrite(71,HIGH);
     digitalWrite(72,LOW);
     digitalWrite(73,HIGH);
     digitalWrite(74,HIGH);
     break;
   case 4:
     digitalWrite(70,HIGH);
     digitalWrite(71,HIGH);
     digitalWrite(72,HIGH);
     digitalWrite(73,LOW);
     digitalWrite(74,HIGH);
     break;
   case 5:
     digitalWrite(70,HIGH);
     digitalWrite(71,HIGH);
     digitalWrite(72,HIGH);
     digitalWrite(73,HIGH);
     digitalWrite(74,LOW);
     break;
   default:
     heartBeat(1.0);  
     break; 
   }
   break;
 default:
   heartBeat(1.0); 
   break;
 }
 switch (d){
 case 0:
   d1();
   aus();
   break;
 case 1:
   d1();
   an();
   d1();
   aus();
   break; 
 case 2:
   d1();
   break;
 case 3:
   d1();
   aus();
   delay(sensorValue3);
   break;
 case 4:
   R =  random (0, 4);
   d1();
   switch (R){
   case 0:
     d1();
     aus();
     break;
   case 1:
     d1();
     an();
     d1();
     aus();
     break; 
   case 2:
     d1();
     break;
   case 3:
     d1();
     aus();
     delay(sensorValue3);
     break;
   }
   break; 
 default:
   heartBeat(1.0); 
   break;
 }   

}


///// ebene (a,b,c) /////a 1 oben - 5 unten /////b 0 alle 1 links - 5 rechts /////c 0 aus(); 1 an(); 2 null; 3 aus(delay); oder 4 zufall void ebene(int a, int b, int c) {

 switch (b){
 case 0:
   digitalWrite(8,HIGH);
   digitalWrite(9,HIGH);
   digitalWrite(10,HIGH);
   digitalWrite(11,HIGH);
   digitalWrite(12,HIGH);
   break;
 case 1:
   digitalWrite(8,HIGH);
   digitalWrite(9,LOW);
   digitalWrite(10,LOW);
   digitalWrite(11,LOW);
   digitalWrite(12,LOW);
   break;    
 case 2:
   digitalWrite(8,LOW);
   digitalWrite(9,HIGH);
   digitalWrite(10,LOW);
   digitalWrite(11,LOW);
   digitalWrite(12,LOW);
   break;
 case 3:
   digitalWrite(8,LOW);
   digitalWrite(9,LOW);
   digitalWrite(10,HIGH);
   digitalWrite(11,LOW);
   digitalWrite(12,LOW);
   break;   
 case 4:
   digitalWrite(8,LOW);
   digitalWrite(9,LOW);
   digitalWrite(10,LOW);
   digitalWrite(11,HIGH);
   digitalWrite(12,LOW);
   break;    
 case 5:
   digitalWrite(8,LOW);
   digitalWrite(9,LOW);
   digitalWrite(10,LOW);
   digitalWrite(11,LOW);
   digitalWrite(12,HIGH);
   break;    
 }
 switch (a) {
 case 1:
   digitalWrite(22,LOW);
   digitalWrite(23,LOW);
   digitalWrite(24,LOW);
   digitalWrite(25,LOW);
   digitalWrite(26,LOW);
   break;
 case 2:
   digitalWrite(30,LOW);
   digitalWrite(31,LOW);
   digitalWrite(32,LOW);
   digitalWrite(33,LOW);
   digitalWrite(34,LOW);
   break;
 case 3:
   digitalWrite(38,LOW);
   digitalWrite(39,LOW);
   digitalWrite(40,LOW);
   digitalWrite(41,LOW);
   digitalWrite(42,LOW);
   break;
 case 4:
   digitalWrite(46,LOW);
   digitalWrite(47,LOW);
   digitalWrite(48,LOW);
   digitalWrite(49,LOW);
   digitalWrite(50,LOW);
   break;
 case 5:
   digitalWrite(70,LOW);
   digitalWrite(71,LOW);
   digitalWrite(72,LOW);
   digitalWrite(73,LOW);
   digitalWrite(74,LOW);
   break;
 default:
   heartBeat(1.0);
   break;
 }
 switch (c){
 case 0:
   d1();
   aus();
   break;
 case 1:
   d1();
   an();
   d1();
   aus();
   break; 
 case 2:
   d1();
   break;
 case 3:
   d1();
   aus();
   delay(sensorValue3);
   break;
 case 4:
   R =  random (0, 4);
   d1();
   switch (R){
   case 0:
     d1();
     aus();
     break;
   case 1:
     d1();
     an();
     d1();
     aus();
     break; 
   case 2:
     d1();
     break;
   case 3:
     d1();
     aus();
     delay(sensorValue3);
     break;
   }
   break; 
 }   

} ///// flaeche (a,b,c) /////a 1 hinten - 5 vorn /////b 0 alle 1 rechts - 5 links /////c 0 aus(); 1 an(); 2 null; 3 aus(delay); oder 4 zufall void flaeche(int a, int b, int c) {

 switch (b){
 case 0:
   digitalWrite(8,HIGH);
   digitalWrite(9,HIGH);
   digitalWrite(10,HIGH);
   digitalWrite(11,HIGH);
   digitalWrite(12,HIGH);
   break;
 case 1:
   digitalWrite(8,HIGH);
   digitalWrite(9,LOW);
   digitalWrite(10,LOW);
   digitalWrite(11,LOW);
   digitalWrite(12,LOW);
   break;    
 case 2:
   digitalWrite(8,LOW);
   digitalWrite(9,HIGH);
   digitalWrite(10,LOW);
   digitalWrite(11,LOW);
   digitalWrite(12,LOW);
   break;
 case 3:
   digitalWrite(8,LOW);
   digitalWrite(9,LOW);
   digitalWrite(10,HIGH);
   digitalWrite(11,LOW);
   digitalWrite(12,LOW);
   break;   
 case 4:
   digitalWrite(8,LOW);
   digitalWrite(9,LOW);
   digitalWrite(10,LOW);
   digitalWrite(11,HIGH);
   digitalWrite(12,LOW);
   break;    
 case 5:
   digitalWrite(8,LOW);
   digitalWrite(9,LOW);
   digitalWrite(10,LOW);
   digitalWrite(11,LOW);
   digitalWrite(12,HIGH);
   break;    
 }
 switch (a) {
 case 1:
   digitalWrite(22,LOW);
   digitalWrite(30,LOW);
   digitalWrite(38,LOW);
   digitalWrite(46,LOW);
   digitalWrite(70,LOW);
   break;
 case 2:
   digitalWrite(23,LOW);
   digitalWrite(31,LOW);
   digitalWrite(39,LOW);
   digitalWrite(47,LOW);
   digitalWrite(71,LOW);
   break;
 case 3:
   digitalWrite(24,LOW);
   digitalWrite(32,LOW);
   digitalWrite(40,LOW);
   digitalWrite(48,LOW);
   digitalWrite(72,LOW);
   break;
 case 4:
   digitalWrite(25,LOW);
   digitalWrite(33,LOW);
   digitalWrite(41,LOW);
   digitalWrite(49,LOW);
   digitalWrite(73,LOW);
   break;
 case 5:
   digitalWrite(26,LOW);
   digitalWrite(34,LOW);
   digitalWrite(42,LOW);
   digitalWrite(50,LOW);
   digitalWrite(74,LOW);
   break;
 default:
   heartBeat(1.0);
   break;
 }
 switch (c){
 case 0:
   d1();
   aus();
   break;
 case 1:
   d1();
   an();
   d1();
   aus();
   break; 
 case 2:
   d1();
   break;
 case 3:
   d1();
   aus();
   delay(sensorValue3);
   break;
 case 4:
   R =  random (0, 4);
   d1();
   switch (R){
   case 0:
     d1();
     aus();
     break;
   case 1:
     d1();
     an();
     d1();
     aus();
     break; 
   case 2:
     d1();
     break;
   case 3:
     d1();
     aus();
     delay(sensorValue3);
     break;
   }
   break; 
 }   

} ///// reihe (a,b,c) /////a 0 alle 25 einzeln /////b 0-5 mit null ganze reihe 1-5 jeweils die einzelne LED dieser reihe /////c 0 aus(); 1 an(); 2 null; 3 aus(delay); oder 4 zufall void reihe(int a, int b, int c) {

 switch (b){
 case 0:
   digitalWrite(8,HIGH);
   digitalWrite(9,HIGH);
   digitalWrite(10,HIGH);
   digitalWrite(11,HIGH);
   digitalWrite(12,HIGH);
   break;
 case 1:
   digitalWrite(8,HIGH);
   digitalWrite(9,LOW);
   digitalWrite(10,LOW);
   digitalWrite(11,LOW);
   digitalWrite(12,LOW);
   break;    
 case 2:
   digitalWrite(8,LOW);
   digitalWrite(9,HIGH);
   digitalWrite(10,LOW);
   digitalWrite(11,LOW);
   digitalWrite(12,LOW);
   break;
 case 3:
   digitalWrite(8,LOW);
   digitalWrite(9,LOW);
   digitalWrite(10,HIGH);
   digitalWrite(11,LOW);
   digitalWrite(12,LOW);
   break;   
 case 4:
   digitalWrite(8,LOW);
   digitalWrite(9,LOW);
   digitalWrite(10,LOW);
   digitalWrite(11,HIGH);
   digitalWrite(12,LOW);
   break;    
 case 5:
   digitalWrite(8,LOW);
   digitalWrite(9,LOW);
   digitalWrite(10,LOW);
   digitalWrite(11,LOW);
   digitalWrite(12,HIGH);
   break;    
 }
 switch (a) {
 case 0:
   digitalWrite(22,LOW);
   digitalWrite(23,LOW);
   digitalWrite(24,LOW);
   digitalWrite(25,LOW);
   digitalWrite(26,LOW);
   digitalWrite(30,LOW);
   digitalWrite(31,LOW);
   digitalWrite(32,LOW);
   digitalWrite(33,LOW);
   digitalWrite(34,LOW);
   digitalWrite(38,LOW);
   digitalWrite(39,LOW);
   digitalWrite(40,LOW);
   digitalWrite(41,LOW);
   digitalWrite(42,LOW);
   digitalWrite(46,LOW);
   digitalWrite(47,LOW);
   digitalWrite(48,LOW);
   digitalWrite(49,LOW);
   digitalWrite(50,LOW);
   digitalWrite(70,LOW);
   digitalWrite(71,LOW);
   digitalWrite(72,LOW);
   digitalWrite(73,LOW);
   digitalWrite(74,LOW);
   break;
 case 1:
   digitalWrite(22,LOW);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;
 case 2:
   digitalWrite(22,HIGH);
   digitalWrite(23,LOW);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;
 case 3:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,LOW);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;
 case 4:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,LOW);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;
 case 5:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,LOW);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;
 case 6:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,LOW);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;
 case 7:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,LOW);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;
 case 8:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,LOW);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;
 case 9:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,LOW);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;
 case 10:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,LOW);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;
 case 11:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,LOW);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;
 case 12:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,LOW);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;
 case 13:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,LOW);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;
 case 14:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,LOW);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;
 case 15:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,LOW);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;
 case 16:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,LOW);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;    
 case 17:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,LOW);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;      
 case 18:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,LOW);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;      
 case 19:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,LOW);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;      
 case 20:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,LOW);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;      
 case 21:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,LOW);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;      
 case 22:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,LOW);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;      
 case 23:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,LOW);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;      
 case 24:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,LOW);
   digitalWrite(74,HIGH);
   break;      
 case 25:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,LOW);
   break;      


 default:
   heartBeat(1.0);
   break;
 }
 switch (c){
 case 0:
   d1();
   aus();
   break;
 case 1:
   d1();
   an();
   d1();
   aus();
   break; 
 case 2:
   d1();
   break;
 case 3:
   d1();
   aus();
   delay(sensorValue3);
   break;
 case 4:
   R =  random (0, 4);
   d1();
   switch (R){
   case 0:
     d1();
     aus();
     break;
   case 1:
     d1();
     an();
     d1();
     aus();
     break; 
   case 2:
     d1();
     break;
   case 3:
     d1();
     aus();
     delay(sensorValue3);
     break;
   }
   break; 
 }   

} void fa1() {

 for(int c = 0; c < 5; c++) {     
   for(int a = 0; a < 5; a++) {      
     digitalWrite(anode[a], HIGH);
     digitalWrite(ce1[c], LOW);
     d1();
     digitalWrite(anode[a], LOW); 
     digitalWrite(ce1[c], HIGH);
   } 
 }

}

void fb1() {

 for(int c = 0; c < 5; c++) {     
   for(int a = 0; a < 5; a++) {      
     digitalWrite(anode[a], HIGH);
     digitalWrite(ce2[c], LOW);
     d1();
     digitalWrite(anode[a], LOW); 
     digitalWrite(ce2[c], HIGH);
   }
 }

}

void fc1() {

 for(int c = 0; c < 5; c++) {     
   for(int a = 0; a < 5; a++) {      
     digitalWrite(anode[a], HIGH);
     digitalWrite(ce3[c], LOW);
     d1();
     digitalWrite(anode[a], LOW); 
     digitalWrite(ce3[c], HIGH);
   }
 }

}

void fd1() {

 for(int c = 0; c < 5; c++) {     
   for(int a = 0; a < 5; a++) {      
     digitalWrite(anode[a], HIGH);
     digitalWrite(ce4[c], LOW);
     d1();
     digitalWrite(anode[a], LOW); 
     digitalWrite(ce4[c], HIGH);
   }
 }

} void fe1() {

 for(int c = 0; c < 5; c++) {     
   for(int a = 0; a < 5; a++) {      
     digitalWrite(anode[a], HIGH);
     digitalWrite(ce5[c], LOW);
     d1();
     digitalWrite(anode[a], LOW); 
     digitalWrite(ce5[c], HIGH);
   }
 }

} void fa1random(){

 R = random(1, 6);
 switch (R) {
 case 1:
   fa1();
   break;
 case 2:
   fb1();
   break;
 case 3:
   fc1();
   break;
 case 4:
   fd1();
   break;
 case 5:
   fe1();
   break;
 } 

} void ff1() {

 for(int c = 0; c < 5; c++) {     
   for(int a = 0; a < 5; a++) {      
     digitalWrite(anode[a], HIGH);
     digitalWrite(cf1[c], LOW);
     d1();
     digitalWrite(anode[a], LOW); 
     digitalWrite(cf1[c], HIGH);
   }
 }

} void fg1() {

 for(int c = 0; c < 5; c++) {     
   for(int a = 0; a < 5; a++) {      
     digitalWrite(anode[a], HIGH);
     digitalWrite(cf2[c], LOW);
     d1();
     digitalWrite(anode[a], LOW); 
     digitalWrite(cf2[c], HIGH);
   }
 }

} void fh1() {

 for(int c = 0; c < 5; c++) {     
   for(int a = 0; a < 5; a++) {      
     digitalWrite(anode[a], HIGH);
     digitalWrite(cf3[c], LOW);
     d1();
     digitalWrite(anode[a], LOW); 
     digitalWrite(cf3[c], HIGH);
   }
 }

} void fi1() {

 for(int c = 0; c < 5; c++) {     
   for(int a = 0; a < 5; a++) {      
     digitalWrite(anode[a], HIGH);
     digitalWrite(cf4[c], LOW);
     d1();
     digitalWrite(anode[a], LOW); 
     digitalWrite(cf4[c], HIGH);
   }
 }

} void fj1() {

 for(int c = 0; c < 5; c++) {     
   for(int a = 0; a < 5; a++) {      
     digitalWrite(anode[a], HIGH);
     digitalWrite(cf5[c], LOW);
     d1();
     digitalWrite(anode[a], LOW); 
     digitalWrite(cf5[c], HIGH);
   }
 }

} void ff1random(){

 R = random(1, 6);
 switch (R) {
 case 1:
   ff1();
   break;
 case 2:
   fg1();
   break;
 case 3:
   fh1();
   break;
 case 4:
   fi1();
   break;
 case 5:
   fj1();
   break;
 } 

} void fa2() {

 for(int a = 0; a < 5; a++) {     
   for(int c = 0; c < 5; c++) {      
     digitalWrite(anode[a], HIGH);
     digitalWrite(ce1[c], LOW);
     d1();
     digitalWrite(anode[a], LOW); 
     digitalWrite(ce1[c], HIGH);
   }
 }

} void fb2() {

 for(int a = 0; a < 5; a++) {     
   for(int c = 0; c < 5; c++) {      
     digitalWrite(anode[a], HIGH);
     digitalWrite(ce2[c], LOW);
     d1();
     digitalWrite(anode[a], LOW); 
     digitalWrite(ce2[c], HIGH);
   }
 }

} void fc2() {

 for(int a = 0; a < 5; a++) {     
   for(int c = 0; c < 5; c++) {      
     digitalWrite(anode[a], HIGH);
     digitalWrite(ce3[c], LOW);
     d1();
     digitalWrite(anode[a], LOW); 
     digitalWrite(ce3[c], HIGH);
   }
 }

} void fd2() {

 for(int a = 0; a < 5; a++) {     
   for(int c = 0; c < 5; c++) {      
     digitalWrite(anode[a], HIGH);
     digitalWrite(ce4[c], LOW);
     d1();
     digitalWrite(anode[a], LOW); 
     digitalWrite(ce4[c], HIGH);
   }
 }

} void fe2() {

 for(int a = 0; a < 5; a++) {     
   for(int c = 0; c < 5; c++) {      
     digitalWrite(anode[a], HIGH);
     digitalWrite(ce5[c], LOW);
     d1();
     digitalWrite(anode[a], LOW); 
     digitalWrite(ce5[c], HIGH);
   }
 }

} void fa2random(){

 R = random(1, 6);
 switch (R) {
 case 1:
   fa2();
   break;
 case 2:
   fb2();
   break;
 case 3:
   fc2();
   break;
 case 4:
   fd2();
   break;
 case 5:
   fe2();
   break;
 } 

} void ff2() {

 for(int a = 0; a < 5; a++) {     
   for(int c = 0; c < 5; c++) {      
     digitalWrite(anode[a], HIGH);
     digitalWrite(cf1[c], LOW);
     d1();
     digitalWrite(anode[a], LOW); 
     digitalWrite(cf1[c], HIGH);
   }
 }

} void fg2() {

 for(int a = 0; a < 5; a++) {     
   for(int c = 0; c < 5; c++) {      
     digitalWrite(anode[a], HIGH);
     digitalWrite(cf2[c], LOW);
     d1();
     digitalWrite(anode[a], LOW); 
     digitalWrite(cf2[c], HIGH);
   }
 }

} void fh2() {

 for(int a = 0; a < 5; a++) {     
   for(int c = 0; c < 5; c++) {      
     digitalWrite(anode[a], HIGH);
     digitalWrite(cf3[c], LOW);
     d1();
     digitalWrite(anode[a], LOW); 
     digitalWrite(cf3[c], HIGH);
   }
 }

} void fi2() {

 for(int a = 0; a < 5; a++) {     
   for(int c = 0; c < 5; c++) {      
     digitalWrite(anode[a], HIGH);
     digitalWrite(cf4[c], LOW);
     d1();
     digitalWrite(anode[a], LOW); 
     digitalWrite(cf4[c], HIGH);
   }
 }

} void fj2() {

 for(int a = 0; a < 5; a++) {     
   for(int c = 0; c < 5; c++) {      
     digitalWrite(anode[a], HIGH);
     digitalWrite(cf5[c], LOW);
     d1();
     digitalWrite(anode[a], LOW); 
     digitalWrite(cf5[c], HIGH);
   }
 }

} void ff2random(){

 R = random(1, 6);
 switch (R) {
 case 1:
   ff2();
   break;
 case 2:
   fg2();
   break;
 case 3:
   fh2();
   break;
 case 4:
   fi2();
   break;
 case 5:
   fj2();
   break;
 } 

} void f2(){

 for(int a = 21; a > 0; a--){
   switch (a) 
   {
   case 1:
     fa1();
     break;
   case 2:
     fb1();
     break;  
   case 3:
     fc1();
     break; 
   case 4:
     fd1();
     break; 
   case 5:
     fe1();
     break; 
   case 6:
     ff1();
     break;
   case 7:
     fg1();
     break;  
   case 8:
     fh1();
     break; 
   case 9:
     fi1();
     break; 
   case 10:
     fj1();
     break; 
   case 11:
     fa2();
     break;
   case 12:
     fb2();
     break;  
   case 13:
     fc2();
     break; 
   case 14:
     fd2();
     break; 
   case 15:
     fe2();
     break; 
   case 16:
     ff2();
     break;
   case 17:
     fg2();
     break;  
   case 18:
     fh2();
     break; 
   case 19:
     fi2();
     break; 
   case 20:
     fj2();
     break; 
   }  
 }

} void f1(){

 for(int a = 0; a < 21; a++){
   switch (a) 
   {
   case 1:
     fa1();
     break;
   case 2:
     fb1();
     break;  
   case 3:
     fc1();
     break; 
   case 4:
     fd1();
     break; 
   case 5:
     fe1();
     break; 
   case 6:
     ff1();
     break;
   case 7:
     fg1();
     break;  
   case 8:
     fh1();
     break; 
   case 9:
     fi1();
     break; 
   case 10:
     fj1();
     break; 
   case 11:
     fa2();
     break;
   case 12:
     fb2();
     break;  
   case 13:
     fc2();
     break; 
   case 14:
     fd2();
     break; 
   case 15:
     fe2();
     break; 
   case 16:
     ff2();
     break;
   case 17:
     fg2();
     break;  
   case 18:
     fh2();
     break; 
   case 19:
     fi2();
     break; 
   case 20:
     fj2();
     break; 
   }  
 }

} void an(){

 digitalWrite(8,HIGH);
 digitalWrite(9,HIGH);
 digitalWrite(10,HIGH);
 digitalWrite(11,HIGH);
 digitalWrite(12,HIGH);
 digitalWrite(22,LOW);
 digitalWrite(23,LOW);
 digitalWrite(24,LOW);
 digitalWrite(25,LOW);
 digitalWrite(26,LOW);
 digitalWrite(30,LOW);
 digitalWrite(31,LOW);
 digitalWrite(32,LOW);
 digitalWrite(33,LOW);
 digitalWrite(34,LOW);
 digitalWrite(38,LOW);
 digitalWrite(39,LOW);
 digitalWrite(40,LOW);
 digitalWrite(41,LOW);
 digitalWrite(42,LOW);
 digitalWrite(46,LOW);
 digitalWrite(47,LOW);
 digitalWrite(48,LOW);
 digitalWrite(49,LOW);
 digitalWrite(50,LOW);
 digitalWrite(70,LOW);
 digitalWrite(71,LOW);
 digitalWrite(72,LOW);
 digitalWrite(73,LOW);
 digitalWrite(74,LOW);

} void aus(){

 digitalWrite(8,HIGH);
 digitalWrite(9,HIGH);
 digitalWrite(10,HIGH);
 digitalWrite(11,HIGH);
 digitalWrite(12,HIGH);
 digitalWrite(22,HIGH);
 digitalWrite(23,HIGH);
 digitalWrite(24,HIGH);
 digitalWrite(25,HIGH);
 digitalWrite(26,HIGH);
 digitalWrite(30,HIGH);
 digitalWrite(31,HIGH);
 digitalWrite(32,HIGH);
 digitalWrite(33,HIGH);
 digitalWrite(34,HIGH);
 digitalWrite(38,HIGH);
 digitalWrite(39,HIGH);
 digitalWrite(40,HIGH);
 digitalWrite(41,HIGH);
 digitalWrite(42,HIGH);
 digitalWrite(46,HIGH);
 digitalWrite(47,HIGH);
 digitalWrite(48,HIGH);
 digitalWrite(49,HIGH);
 digitalWrite(50,HIGH);
 digitalWrite(70,HIGH);
 digitalWrite(71,HIGH);
 digitalWrite(72,HIGH);
 digitalWrite(73,HIGH);
 digitalWrite(74,HIGH);

}


void reihea(int a, int b) {

 switch (b){
 case 0:
   digitalWrite(8,HIGH);
   digitalWrite(9,HIGH);
   digitalWrite(10,HIGH);
   digitalWrite(11,HIGH);
   digitalWrite(12,HIGH);
   break;
 case 1:
   digitalWrite(8,HIGH);
   digitalWrite(9,LOW);
   digitalWrite(10,LOW);
   digitalWrite(11,LOW);
   digitalWrite(12,LOW);
   break;    
 case 2:
   digitalWrite(8,LOW);
   digitalWrite(9,HIGH);
   digitalWrite(10,LOW);
   digitalWrite(11,LOW);
   digitalWrite(12,LOW);
   break;
 case 3:
   digitalWrite(8,LOW);
   digitalWrite(9,LOW);
   digitalWrite(10,HIGH);
   digitalWrite(11,LOW);
   digitalWrite(12,LOW);
   break;   
 case 4:
   digitalWrite(8,LOW);
   digitalWrite(9,LOW);
   digitalWrite(10,LOW);
   digitalWrite(11,HIGH);
   digitalWrite(12,LOW);
   break;    
 case 5:
   digitalWrite(8,LOW);
   digitalWrite(9,LOW);
   digitalWrite(10,LOW);
   digitalWrite(11,LOW);
   digitalWrite(12,HIGH);
   break;    
 }
 switch (a) {
 case 1://s
   digitalWrite(22,LOW);
   digitalWrite(23,LOW);
   digitalWrite(24,LOW);
   digitalWrite(25,LOW);
   digitalWrite(26,LOW);
   digitalWrite(30,LOW);
   digitalWrite(31,LOW);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,LOW);
   digitalWrite(39,LOW);
   digitalWrite(40,LOW);
   digitalWrite(41,LOW);
   digitalWrite(42,LOW);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,LOW);
   digitalWrite(50,LOW);
   digitalWrite(70,LOW);
   digitalWrite(71,LOW);
   digitalWrite(72,LOW);
   digitalWrite(73,LOW);
   digitalWrite(74,LOW);
   break;
 case 2://3
   digitalWrite(22,LOW);
   digitalWrite(23,LOW);
   digitalWrite(24,LOW);
   digitalWrite(25,LOW);
   digitalWrite(26,LOW);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,LOW);
   digitalWrite(34,LOW);
   digitalWrite(38,LOW);
   digitalWrite(39,LOW);
   digitalWrite(40,LOW);
   digitalWrite(41,LOW);
   digitalWrite(42,LOW);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,LOW);
   digitalWrite(50,LOW);
   digitalWrite(70,LOW);
   digitalWrite(71,LOW);
   digitalWrite(72,LOW);
   digitalWrite(73,LOW);
   digitalWrite(74,LOW);
   break;
 case 3://2
   digitalWrite(22,LOW);
   digitalWrite(23,LOW);
   digitalWrite(24,LOW);
   digitalWrite(25,LOW);
   digitalWrite(26,LOW);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,LOW);
   digitalWrite(34,LOW);
   digitalWrite(38,LOW);
   digitalWrite(39,LOW);
   digitalWrite(40,LOW);
   digitalWrite(41,LOW);
   digitalWrite(42,LOW);
   digitalWrite(46,LOW);
   digitalWrite(47,LOW);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,LOW);
   digitalWrite(71,LOW);
   digitalWrite(72,LOW);
   digitalWrite(73,LOW);
   digitalWrite(74,LOW);
   break;
 case 4://w
   digitalWrite(22,LOW);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,LOW);
   digitalWrite(30,LOW);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,LOW);
   digitalWrite(38,LOW);
   digitalWrite(39,HIGH);
   digitalWrite(40,LOW);
   digitalWrite(41,HIGH);
   digitalWrite(42,LOW);
   digitalWrite(46,LOW);
   digitalWrite(47,HIGH);
   digitalWrite(48,LOW);
   digitalWrite(49,HIGH);
   digitalWrite(50,LOW);
   digitalWrite(70,HIGH);
   digitalWrite(71,LOW);
   digitalWrite(72,HIGH);
   digitalWrite(73,LOW);
   digitalWrite(74,HIGH);
   break;
 case 5://.
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,LOW);
   digitalWrite(50,LOW);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,LOW);
   digitalWrite(74,LOW);
   break;
 case 6://o
   digitalWrite(22,HIGH);
   digitalWrite(23,LOW);
   digitalWrite(24,LOW);
   digitalWrite(25,LOW);
   digitalWrite(26,HIGH);
   digitalWrite(30,LOW);
   digitalWrite(31,LOW);
   digitalWrite(32,HIGH);
   digitalWrite(33,LOW);
   digitalWrite(34,LOW);
   digitalWrite(38,LOW);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,LOW);
   digitalWrite(46,LOW);
   digitalWrite(47,LOW);
   digitalWrite(48,HIGH);
   digitalWrite(49,LOW);
   digitalWrite(50,LOW);
   digitalWrite(70,HIGH);
   digitalWrite(71,LOW);
   digitalWrite(72,LOW);
   digitalWrite(73,LOW);
   digitalWrite(74,HIGH);
   break;
 case 7://r
   digitalWrite(22,LOW);
   digitalWrite(23,LOW);
   digitalWrite(24,LOW);
   digitalWrite(25,LOW);
   digitalWrite(26,LOW);
   digitalWrite(30,LOW);
   digitalWrite(31,LOW);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,LOW);
   digitalWrite(38,LOW);
   digitalWrite(39,LOW);
   digitalWrite(40,LOW);
   digitalWrite(41,LOW);
   digitalWrite(42,HIGH);
   digitalWrite(46,LOW);
   digitalWrite(47,LOW);
   digitalWrite(48,HIGH);
   digitalWrite(49,LOW);
   digitalWrite(50,HIGH);
   digitalWrite(70,LOW);
   digitalWrite(71,LOW);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,LOW);
   break;
 case 8://g
   digitalWrite(22,LOW);
   digitalWrite(23,LOW);
   digitalWrite(24,LOW);
   digitalWrite(25,LOW);
   digitalWrite(26,LOW);
   digitalWrite(30,LOW);
   digitalWrite(31,LOW);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,LOW);
   digitalWrite(39,HIGH);
   digitalWrite(40,LOW);
   digitalWrite(41,LOW);
   digitalWrite(42,LOW);
   digitalWrite(46,LOW);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,LOW);
   digitalWrite(50,LOW);
   digitalWrite(70,LOW);
   digitalWrite(71,LOW);
   digitalWrite(72,LOW);
   digitalWrite(73,LOW);
   digitalWrite(74,HIGH);
   break;
 case 9:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,LOW);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;
 case 10:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,LOW);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;
 case 11:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,LOW);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;
 case 12:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,LOW);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;
 case 13:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,LOW);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;
 case 14:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,LOW);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;
 case 15:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,LOW);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;
 case 16:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,LOW);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;    
 case 17:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,LOW);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;      
 case 18:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,LOW);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;      
 case 19:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,LOW);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;      
 case 20:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,LOW);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;      
 case 21:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,LOW);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;      
 case 22:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,LOW);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;      
 case 23:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,LOW);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;      
 case 24:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,LOW);
   digitalWrite(74,HIGH);
   break;      
 case 25:
   digitalWrite(22,HIGH);
   digitalWrite(23,HIGH);
   digitalWrite(24,HIGH);
   digitalWrite(25,HIGH);
   digitalWrite(26,HIGH);
   digitalWrite(30,HIGH);
   digitalWrite(31,HIGH);
   digitalWrite(32,HIGH);
   digitalWrite(33,HIGH);
   digitalWrite(34,HIGH);
   digitalWrite(38,HIGH);
   digitalWrite(39,HIGH);
   digitalWrite(40,HIGH);
   digitalWrite(41,HIGH);
   digitalWrite(42,HIGH);
   digitalWrite(46,HIGH);
   digitalWrite(47,HIGH);
   digitalWrite(48,HIGH);
   digitalWrite(49,HIGH);
   digitalWrite(50,HIGH);
   digitalWrite(70,HIGH);
   digitalWrite(71,HIGH);
   digitalWrite(72,HIGH);
   digitalWrite(73,HIGH);
   digitalWrite(74,HIGH);
   break;      


 default:
   heartBeat(1.0);
   break;
 }

} void lauflicht1 (){

 /////lauflicht 1
 reihe(1,1,x);
 reihe(1,2,x);
 reihe(1,3,x);
 reihe(1,4,x);
 reihe(1,5,x);
 reihe(2,5,x);
 reihe(2,4,x);
 reihe(2,3,x);
 reihe(2,2,x);
 reihe(2,1,x);
 reihe(3,1,x);
 reihe(3,2,x);
 reihe(3,3,x);
 reihe(3,4,x);
 reihe(3,5,x);
 reihe(4,5,x);
 reihe(4,4,x);
 reihe(4,3,x);
 reihe(4,2,x);
 reihe(4,1,x);
 reihe(5,1,x);
 reihe(5,2,x);
 reihe(5,3,x);
 reihe(5,4,x);
 reihe(5,5,x);
 reihe(10,5,x);
 reihe(10,4,x);
 reihe(10,3,x);
 reihe(10,2,x);
 reihe(10,1,x);
 reihe(9,1,x);
 reihe(9,2,x);
 reihe(9,3,x);
 reihe(9,4,x);
 reihe(9,5,x);
 reihe(8,5,x);
 reihe(8,4,x);
 reihe(8,3,x);
 reihe(8,2,x);
 reihe(8,1,x);
 reihe(7,1,x);
 reihe(7,2,x);
 reihe(7,3,x);
 reihe(7,4,x);
 reihe(7,5,x);
 reihe(6,5,x);
 reihe(6,4,x);
 reihe(6,3,x);
 reihe(6,2,x);
 reihe(6,1,x);
 reihe(11,1,x);
 reihe(11,2,x);
 reihe(11,3,x);
 reihe(11,4,x);
 reihe(11,5,x);
 reihe(12,5,x);
 reihe(12,4,x);
 reihe(12,3,x);
 reihe(12,2,x);
 reihe(12,1,x);
 reihe(13,1,x);
 reihe(13,2,x);
 reihe(13,3,x);
 reihe(13,4,x);
 reihe(13,5,x);
 reihe(14,5,x);
 reihe(14,4,x);
 reihe(14,3,x);
 reihe(14,2,x);
 reihe(14,1,x);
 reihe(15,1,x);
 reihe(15,2,x);
 reihe(15,3,x);
 reihe(15,4,x);
 reihe(15,5,x);
 reihe(20,5,x);
 reihe(20,4,x);
 reihe(20,3,x);
 reihe(20,2,x);
 reihe(20,1,x);
 reihe(19,1,x);
 reihe(19,2,x);
 reihe(19,3,x);
 reihe(19,4,x);
 reihe(19,5,x);
 reihe(18,5,x);
 reihe(18,4,x);
 reihe(18,3,x);
 reihe(18,2,x);
 reihe(18,1,x);
 reihe(17,1,x);
 reihe(17,2,x);
 reihe(17,3,x);
 reihe(17,4,x);
 reihe(17,5,x);
 reihe(16,5,x);
 reihe(16,4,x);
 reihe(16,3,x);
 reihe(16,2,x);
 reihe(16,1,x);
 reihe(21,1,x);
 reihe(21,2,x);
 reihe(21,3,x);
 reihe(21,4,x);
 reihe(21,5,x);
 reihe(22,5,x);
 reihe(22,4,x);
 reihe(22,3,x);
 reihe(22,2,x);
 reihe(22,1,x);
 reihe(23,1,x);
 reihe(23,2,x);
 reihe(23,3,x);
 reihe(23,4,x);
 reihe(23,5,x);
 reihe(24,5,x);
 reihe(24,4,x);
 reihe(24,3,x);
 reihe(24,2,x);
 reihe(24,1,x);
 reihe(25,1,x);
 reihe(25,2,x);
 reihe(25,3,x);
 reihe(25,4,x);
 reihe(25,5,x);

} void lauflicht2 (){

 ///////lauflicht 2
 reihe(25,5,x);
 reihe(24,5,x);
 reihe(23,5,x);
 reihe(22,5,x);
 reihe(21,5,x);
 reihe(21,4,x);
 reihe(22,4,x);
 reihe(23,4,x);
 reihe(24,4,x);
 reihe(25,4,x);
 reihe(25,3,x);
 reihe(24,3,x);
 reihe(23,3,x);
 reihe(22,3,x);
 reihe(21,3,x);
 reihe(21,2,x);
 reihe(22,2,x);
 reihe(23,2,x);
 reihe(24,2,x);
 reihe(25,2,x);
 reihe(25,1,x);
 reihe(24,1,x);
 reihe(23,1,x);
 reihe(22,1,x);
 reihe(21,1,x);
 reihe(16,1,x);
 reihe(17,1,x);
 reihe(18,1,x);
 reihe(19,1,x);
 reihe(20,1,x);
 reihe(20,2,x);
 reihe(19,2,x);
 reihe(18,2,x);
 reihe(17,2,x);
 reihe(16,2,x);
 reihe(16,3,x);
 reihe(17,3,x);
 reihe(18,3,x);
 reihe(19,3,x);
 reihe(20,3,x);
 reihe(20,4,x);
 reihe(19,4,x);
 reihe(18,4,x);
 reihe(17,4,x);
 reihe(16,4,x);
 reihe(16,5,x);
 reihe(17,5,x);
 reihe(18,5,x);
 reihe(19,5,x);
 reihe(20,5,x);
 reihe(15,5,x);
 reihe(14,5,x);
 reihe(13,5,x);
 reihe(12,5,x);
 reihe(11,5,x);
 reihe(11,4,x);
 reihe(12,4,x);
 reihe(13,4,x);
 reihe(14,4,x);
 reihe(15,4,x);
 reihe(15,3,x);
 reihe(14,3,x);
 reihe(13,3,x);
 reihe(12,3,x);
 reihe(11,3,x);
 reihe(11,2,x);
 reihe(12,2,x);
 reihe(13,2,x);
 reihe(14,2,x);
 reihe(15,2,x);
 reihe(15,1,x);
 reihe(14,1,x);
 reihe(13,1,x);
 reihe(12,1,x);
 reihe(11,1,x);
 reihe(6,1,x);
 reihe(7,1,x);
 reihe(8,1,x);
 reihe(9,1,x);
 reihe(10,1,x);
 reihe(10,2,x);
 reihe(9,2,x);
 reihe(8,2,x);
 reihe(7,2,x);
 reihe(6,2,x);
 reihe(6,3,x);
 reihe(7,3,x);
 reihe(8,3,x);
 reihe(9,3,x);
 reihe(10,3,x);
 reihe(10,4,x);
 reihe(9,4,x);
 reihe(8,4,x);
 reihe(7,4,x);
 reihe(6,4,x);
 reihe(6,5,x);
 reihe(7,5,x);
 reihe(8,5,x);
 reihe(9,5,x);
 reihe(10,5,x);
 reihe(5,5,x);
 reihe(4,5,x);
 reihe(3,5,x);
 reihe(2,5,x);
 reihe(1,5,x);
 reihe(1,4,x);
 reihe(2,4,x);
 reihe(3,4,x);
 reihe(4,4,x);
 reihe(5,4,x);
 reihe(5,3,x);
 reihe(4,3,x);
 reihe(3,3,x);
 reihe(2,3,x);
 reihe(1,3,x);
 reihe(1,2,x);
 reihe(2,2,x);
 reihe(3,2,x);
 reihe(4,2,x);
 reihe(5,2,x);
 reihe(5,1,x);
 reihe(4,1,x);
 reihe(3,1,x);
 reihe(2,1,x);
 reihe(1,1,x);

} void lauflicht3 (){

 //////lauflicht 3
 reihe(1,1,x);
 reihe(6,1,x);
 reihe(11,1,x);
 reihe(16,1,x);
 reihe(21,1,x);
 reihe(22,1,x);
 reihe(17,1,x);
 reihe(12,1,x);
 reihe(7,1,x);
 reihe(2,1,x);
 reihe(3,1,x);
 reihe(8,1,x);
 reihe(13,1,x);
 reihe(18,1,x);
 reihe(23,1,x);
 reihe(24,1,x);
 reihe(19,1,x);
 reihe(14,1,x);
 reihe(9,1,x);
 reihe(4,1,x);
 reihe(5,1,x);
 reihe(10,1,x);
 reihe(15,1,x);
 reihe(20,1,x);
 reihe(25,1,x);
 reihe(25,2,x);
 reihe(20,2,x);
 reihe(15,2,x);
 reihe(10,2,x);
 reihe(5,2,x);
 reihe(4,2,x);
 reihe(9,2,x);
 reihe(14,2,x);
 reihe(19,2,x);
 reihe(24,2,x);
 reihe(23,2,x);
 reihe(18,2,x);
 reihe(13,2,x);
 reihe(8,2,x);
 reihe(3,2,x);
 reihe(2,2,x);
 reihe(7,2,x);
 reihe(12,2,x);
 reihe(17,2,x);
 reihe(22,2,x);
 reihe(21,2,x);
 reihe(16,2,x);
 reihe(11,2,x);
 reihe(6,2,x);
 reihe(1,2,x);
 reihe(1,3,x);
 reihe(6,3,x);
 reihe(11,3,x);
 reihe(16,3,x);
 reihe(21,3,x);
 reihe(22,3,x);
 reihe(17,3,x);
 reihe(12,3,x);
 reihe(7,3,x);
 reihe(2,3,x);
 reihe(3,3,x);
 reihe(8,3,x);
 reihe(13,3,x);
 reihe(18,3,x);
 reihe(23,3,x);
 reihe(24,3,x);
 reihe(19,3,x);
 reihe(14,3,x);
 reihe(9,3,x);
 reihe(4,3,x);
 reihe(5,3,x);
 reihe(10,3,x);
 reihe(15,3,x);
 reihe(20,3,x);
 reihe(25,3,x);
 reihe(25,4,x);
 reihe(20,4,x);
 reihe(15,4,x);
 reihe(10,4,x);
 reihe(5,4,x);
 reihe(4,4,x);
 reihe(9,4,x);
 reihe(14,4,x);
 reihe(19,4,x);
 reihe(24,4,x);
 reihe(23,4,x);
 reihe(18,4,x);
 reihe(13,4,x);
 reihe(8,4,x);
 reihe(3,4,x);
 reihe(2,4,x);
 reihe(7,4,x);
 reihe(12,4,x);
 reihe(17,4,x);
 reihe(22,4,x);
 reihe(21,4,x);
 reihe(16,4,x);
 reihe(11,4,x);
 reihe(6,4,x);
 reihe(1,4,x);
 reihe(1,5,x);
 reihe(6,5,x);
 reihe(11,5,x);
 reihe(16,5,x);
 reihe(21,5,x);
 reihe(22,5,x);
 reihe(17,5,x);
 reihe(12,5,x);
 reihe(7,5,x);
 reihe(2,5,x);
 reihe(3,5,x);
 reihe(8,5,x);
 reihe(13,5,x);
 reihe(18,5,x);
 reihe(23,5,x);
 reihe(24,5,x);
 reihe(19,5,x);
 reihe(14,5,x);
 reihe(9,5,x);
 reihe(4,5,x);
 reihe(5,5,x);
 reihe(10,5,x);
 reihe(15,5,x);
 reihe(20,5,x);
 reihe(25,5,x);

}

void lauflicht4 (){

 ///////lauflicht4
 reihe(25,5,x);
 reihe(20,5,x);
 reihe(15,5,x);
 reihe(10,5,x);
 reihe(5,5,x);
 reihe(5,4,x);
 reihe(10,4,x);
 reihe(15,4,x);
 reihe(20,4,x);
 reihe(25,4,x);
 reihe(25,3,x);
 reihe(20,3,x);
 reihe(15,3,x);
 reihe(10,3,x);
 reihe(5,3,x);
 reihe(5,2,x);
 reihe(10,2,x);
 reihe(15,2,x);
 reihe(20,2,x);
 reihe(25,2,x);
 reihe(25,1,x);
 reihe(20,1,x);
 reihe(15,1,x);
 reihe(10,1,x);
 reihe(5,1,x);
 reihe(4,1,x);
 reihe(9,1,x);
 reihe(14,1,x);
 reihe(19,1,x);
 reihe(24,1,x);
 reihe(24,2,x);
 reihe(19,2,x);
 reihe(14,2,x);
 reihe(9,2,x);
 reihe(4,2,x);
 reihe(4,3,x);
 reihe(9,3,x);
 reihe(14,3,x);
 reihe(19,3,x);
 reihe(24,3,x);
 reihe(24,4,x);
 reihe(19,4,x);
 reihe(14,4,x);
 reihe(9,4,x);
 reihe(4,4,x);
 reihe(4,5,x);
 reihe(9,5,x);
 reihe(14,5,x);
 reihe(19,5,x);
 reihe(24,5,x);
 reihe(23,5,x);
 reihe(18,5,x);
 reihe(13,5,x);
 reihe(8,5,x);
 reihe(3,5,x);
 reihe(3,4,x);
 reihe(8,4,x);
 reihe(13,4,x);
 reihe(18,4,x);
 reihe(23,4,x);
 reihe(23,3,x);
 reihe(18,3,x);
 reihe(13,3,x);
 reihe(8,3,x);
 reihe(3,3,x);
 reihe(3,2,x);
 reihe(8,2,x);
 reihe(13,2,x);
 reihe(18,2,x);
 reihe(23,2,x);
 reihe(23,1,x);
 reihe(18,1,x);
 reihe(13,1,x);
 reihe(8,1,x);
 reihe(3,1,x);
 reihe(2,1,x);
 reihe(7,1,x);
 reihe(12,1,x);
 reihe(17,1,x);
 reihe(22,1,x);
 reihe(22,2,x);
 reihe(17,2,x);
 reihe(12,2,x);
 reihe(7,2,x);
 reihe(2,2,x);
 reihe(2,3,x);
 reihe(7,3,x);
 reihe(12,3,x);
 reihe(17,3,x);
 reihe(22,3,x);
 reihe(22,4,x);
 reihe(17,4,x);
 reihe(12,4,x);
 reihe(7,4,x);
 reihe(2,4,x);
 reihe(2,5,x);
 reihe(7,5,x);
 reihe(12,5,x);
 reihe(17,5,x);
 reihe(22,5,x);
 reihe(21,5,x);
 reihe(16,5,x);
 reihe(11,5,x);
 reihe(6,5,x);
 reihe(1,5,x);
 reihe(1,4,x);
 reihe(6,4,x);
 reihe(11,4,x);
 reihe(16,4,x);
 reihe(21,4,x);
 reihe(21,3,x);
 reihe(16,3,x);
 reihe(11,3,x);
 reihe(6,3,x);
 reihe(1,3,x);
 reihe(1,2,x);
 reihe(6,2,x);
 reihe(11,2,x);
 reihe(16,2,x);
 reihe(21,2,x);
 reihe(21,1,x);
 reihe(16,1,x);
 reihe(11,1,x);
 reihe(6,1,x);
 reihe(1,1,x);

} void buttons(){

 buttonState1 = digitalRead(buttonPin1);
 if (buttonState1 != lastButtonState1) {
   if (buttonPushCounter2 >= 0) {
     buttonPushCounter2 = 0 ;
   }  
   if (buttonState1 == HIGH) {
     buttonPushCounter1++;
     Serial.println("on");
     Serial.print("number of button1 pushes:  ");
     Serial.println(buttonPushCounter1, DEC);
   } 
   else {
     Serial.println("off"); 
   }
   lastButtonState1 = buttonState1;
 }
 if (buttonPushCounter1 % 2 == 0) {
   digitalWrite(ledPin1, HIGH);
 } 
 else {
   digitalWrite(ledPin1, LOW);
 }
 if (buttonPushCounter1 == 40) {
   buttonPushCounter1 = -1;
 } 


 buttonState2 = digitalRead(buttonPin2);
 if (buttonState2 != lastButtonState2) {
   if (buttonPushCounter1 >= 0) {
     buttonPushCounter1 = 0 ;
   }  
   if (buttonState2 == HIGH) {
     buttonPushCounter2++;
     Serial.println("on");
     Serial.print("number of button2 pushes:  ");
     Serial.println(buttonPushCounter2, DEC);
   } 
   else {
     Serial.println("off"); 
   }
   lastButtonState2 = buttonState2;
 }
 if (buttonPushCounter2 % 2 == 0) {
   digitalWrite(ledPin2, HIGH);
 } 
 else {
   digitalWrite(ledPin2, LOW);
 }  
 if (buttonPushCounter2 == 40) {
   buttonPushCounter2 = -1;
 } 
 buttonState3 = digitalRead(buttonPin3);
 if (buttonState3 != lastButtonState3) {
   if (buttonState3 == HIGH) {
     buttonPushCounter3++;
     Serial.println("on");
     Serial.print("number of button3 pushes:  ");
     Serial.println(buttonPushCounter3, DEC);
   } 
   else {
     Serial.println("off"); 
   }
   lastButtonState3 = buttonState3;
 }
 if (buttonPushCounter3 % 2 == 0) {
   digitalWrite(ledPin3, HIGH);
 } 
 else {
   digitalWrite(ledPin3, LOW);
 } 
 if (buttonPushCounter3 == 5) {
   buttonPushCounter3 = -1;
 } 

}

</HighlightSyntax>