#ifndef PT6955_ARDUINO_H
#define PT6955_ARDUINO_H
  // display setup

void initializeDisplay(){ 
 
  SPI.begin();                             //  Initialize SPI parameters
  SPI.setBitOrder(LSBFIRST);               //  Least significant byte to be sent first
  SPI.setDataMode(SPI_MODE3);              //  Set for clock rising edge
  SPI.setClockDivider(SPI_CLOCK_DIV64);    //  Set clock divider (optional)
  delay(200);
  
  digitalWrite(10,LOW);                
  SPI.transfer(B01000000);             //COMMAND 2: DATA SETTING COMMANDS
  digitalWrite(10,HIGH); 
  
  digitalWrite(10,LOW);                
  SPI.transfer(B11000000);             //COMMAND 3: ADDRESS SETTING COMMANDS
  digitalWrite(10,HIGH);
 
  digitalWrite(10,LOW);                
  SPI.transfer(B00000001);             //COMMAND 1: DISPLAY MODE SETTING COMMANDS  - 00: 4 digits, 12 segments
  digitalWrite(10,HIGH);                
  
  digitalWrite(10,LOW);                
  SPI.transfer(B10001011);             //COMMAND 4: DISPLAY CONTROL COMMANDS
  digitalWrite(10,HIGH); 
}


void Pulse_w(char mode){
  digitalWrite(10,LOW); 
  switch(mode) {
    case 0:
      SPI.transfer(B10001000); // 1/16
      break;
    case 1:
      SPI.transfer(B10001001); // 2/16
      break;
    case 2:
      SPI.transfer(B10001010); // 4/16
      break;
    case 3:
      SPI.transfer(B10001011); // 10/16
      break;
    case 4:
      SPI.transfer(B10001100); // 11/16
      break;
    case 5:
      SPI.transfer(B10001101); // 12/16
      break;
    case 6:
      SPI.transfer(B10001110); // 13/16
      break;
    case 7:
      SPI.transfer(B10001111); // 14/16
      break;
  }
  digitalWrite(10,HIGH);
}

void writedigit1_0(byte LEDMatrix[]){
 LEDMatrix[7] = LEDMatrix[7] | 1; 
 LEDMatrix[6] = LEDMatrix[6] | 8; 
 LEDMatrix[6] = LEDMatrix[6] | 128; 
 LEDMatrix[6] = LEDMatrix[6] | 16; 
 LEDMatrix[6] = LEDMatrix[6] | 64; 
 LEDMatrix[6] = LEDMatrix[6] | 32; 
}

void writedigit1_1(byte LEDMatrix[]){
 LEDMatrix[6] = LEDMatrix[6] | 128; 
 LEDMatrix[6] = LEDMatrix[6] | 64;
}

void writedigit1_2(byte LEDMatrix[]){
 LEDMatrix[7] = LEDMatrix[7] | 1; 
 LEDMatrix[6] = LEDMatrix[6] | 128; 
 LEDMatrix[6] = LEDMatrix[6] | 4; 
 LEDMatrix[6] = LEDMatrix[6] | 16; 
 LEDMatrix[6] = LEDMatrix[6] | 32; 
}

void writedigit1_3(byte LEDMatrix[]){
 LEDMatrix[7] = LEDMatrix[7] | 1; 
 LEDMatrix[6] = LEDMatrix[6] | 128; 
 LEDMatrix[6] = LEDMatrix[6] | 4; 
 LEDMatrix[6] = LEDMatrix[6] | 64; 
 LEDMatrix[6] = LEDMatrix[6] | 32; 
}

void writedigit1_4(byte LEDMatrix[]){
 LEDMatrix[6] = LEDMatrix[6] | 8; 
 LEDMatrix[6] = LEDMatrix[6] | 128; 
 LEDMatrix[6] = LEDMatrix[6] | 4; 
 LEDMatrix[6] = LEDMatrix[6] | 64; 
}

void writedigit1_5(byte LEDMatrix[]){
 LEDMatrix[7] = LEDMatrix[7] | 1; 
 LEDMatrix[6] = LEDMatrix[6] | 8; 
 LEDMatrix[6] = LEDMatrix[6] | 4; 
 LEDMatrix[6] = LEDMatrix[6] | 64; 
 LEDMatrix[6] = LEDMatrix[6] | 32; 
}

void writedigit1_6(byte LEDMatrix[]){
 LEDMatrix[7] = LEDMatrix[7] | 1; 
 LEDMatrix[6] = LEDMatrix[6] | 16; 
 LEDMatrix[6] = LEDMatrix[6] | 8; 
 LEDMatrix[6] = LEDMatrix[6] | 4; 
 LEDMatrix[6] = LEDMatrix[6] | 64; 
 LEDMatrix[6] = LEDMatrix[6] | 32; 
}

void writedigit1_7(byte LEDMatrix[]){
 LEDMatrix[7] = LEDMatrix[7] | 1; 
 LEDMatrix[6] = LEDMatrix[6] | 128; 
 LEDMatrix[6] = LEDMatrix[6] | 64; 
 }

void writedigit1_8(byte LEDMatrix[]){
 LEDMatrix[7] = LEDMatrix[7] | 1; 
 LEDMatrix[6] = LEDMatrix[6] | 16; 
 LEDMatrix[6] = LEDMatrix[6] | 8; 
 LEDMatrix[6] = LEDMatrix[6] | 4; 
 LEDMatrix[6] = LEDMatrix[6] | 64; 
 LEDMatrix[6] = LEDMatrix[6] | 32; 
 LEDMatrix[6] = LEDMatrix[6] | 128; 
}

void writedigit1_9(byte LEDMatrix[]){
 LEDMatrix[7] = LEDMatrix[7] | 1; 
 LEDMatrix[6] = LEDMatrix[6] | 128; 
 LEDMatrix[6] = LEDMatrix[6] | 8; 
 LEDMatrix[6] = LEDMatrix[6] | 4; 
 LEDMatrix[6] = LEDMatrix[6] | 64; 
 LEDMatrix[6] = LEDMatrix[6] | 32; 
}

void writedigit1(byte LEDMatrix[], int newNum){
   switch ( newNum ) {
    case 0:
    writedigit1_0(LEDMatrix);   
    break; 
    case 1:
    writedigit1_1(LEDMatrix);   
    break;     
    case 2:
    writedigit1_2(LEDMatrix);   
    break;     
    case 3:
    writedigit1_3(LEDMatrix);   
    break;     
    case 4:
    writedigit1_4(LEDMatrix);   
    break;     
    case 5:
    writedigit1_5(LEDMatrix);   
    break;
    case 6:
    writedigit1_6(LEDMatrix);   
    break; 
    case 7:
    writedigit1_7(LEDMatrix);   
    break; 
    case 8:
    writedigit1_8(LEDMatrix);   
    break; 
    case 9:
    writedigit1_9(LEDMatrix);   
    break;     
  }
 
}

void writedigit2_0(byte LEDMatrix[]){
 LEDMatrix[5] = LEDMatrix[5] | 1; 
 LEDMatrix[4] = LEDMatrix[4] | 8; 
 LEDMatrix[4] = LEDMatrix[4] | 128; 
 LEDMatrix[4] = LEDMatrix[4] | 16; 
 LEDMatrix[4] = LEDMatrix[4] | 64; 
 LEDMatrix[4] = LEDMatrix[4] | 32; 
}

void writedigit2_1(byte LEDMatrix[]){
 LEDMatrix[4] = LEDMatrix[4] | 128; 
 LEDMatrix[4] = LEDMatrix[4] | 64;
}

void writedigit2_2(byte LEDMatrix[]){
 LEDMatrix[5] = LEDMatrix[5] | 1; 
 LEDMatrix[4] = LEDMatrix[4] | 128; 
 LEDMatrix[4] = LEDMatrix[4] | 4; 
 LEDMatrix[4] = LEDMatrix[4] | 16; 
 LEDMatrix[4] = LEDMatrix[4] | 32; 
}

void writedigit2_3(byte LEDMatrix[]){
 LEDMatrix[5] = LEDMatrix[5] | 1; 
 LEDMatrix[4] = LEDMatrix[4] | 128; 
 LEDMatrix[4] = LEDMatrix[4] | 4; 
 LEDMatrix[4] = LEDMatrix[4] | 64; 
 LEDMatrix[4] = LEDMatrix[4] | 32; 
}

void writedigit2_4(byte LEDMatrix[]){
 LEDMatrix[4] = LEDMatrix[4] | 8; 
 LEDMatrix[4] = LEDMatrix[4] | 128; 
 LEDMatrix[4] = LEDMatrix[4] | 4; 
 LEDMatrix[4] = LEDMatrix[4] | 64; 
}

void writedigit2_5(byte LEDMatrix[]){
 LEDMatrix[5] = LEDMatrix[5] | 1; 
 LEDMatrix[4] = LEDMatrix[4] | 8; 
 LEDMatrix[4] = LEDMatrix[4] | 4; 
 LEDMatrix[4] = LEDMatrix[4] | 64; 
 LEDMatrix[4] = LEDMatrix[4] | 32; 
}

void writedigit2_6(byte LEDMatrix[]){
 LEDMatrix[5] = LEDMatrix[5] | 1; 
 LEDMatrix[4] = LEDMatrix[4] | 16; 
 LEDMatrix[4] = LEDMatrix[4] | 8; 
 LEDMatrix[4] = LEDMatrix[4] | 4; 
 LEDMatrix[4] = LEDMatrix[4] | 64; 
 LEDMatrix[4] = LEDMatrix[4] | 32; 
}

void writedigit2_7(byte LEDMatrix[]){
 LEDMatrix[5] = LEDMatrix[5] | 1; 
 LEDMatrix[4] = LEDMatrix[4] | 128; 
 LEDMatrix[4] = LEDMatrix[4] | 64; 
 }

void writedigit2_8(byte LEDMatrix[]){
 LEDMatrix[5] = LEDMatrix[5] | 1; 
 LEDMatrix[4] = LEDMatrix[4] | 16; 
 LEDMatrix[4] = LEDMatrix[4] | 8; 
 LEDMatrix[4] = LEDMatrix[4] | 4; 
 LEDMatrix[4] = LEDMatrix[4] | 64; 
 LEDMatrix[4] = LEDMatrix[4] | 32; 
 LEDMatrix[4] = LEDMatrix[4] | 128; 
}

void writedigit2_9(byte LEDMatrix[]){
 LEDMatrix[5] = LEDMatrix[5] | 1; 
 LEDMatrix[4] = LEDMatrix[4] | 128; 
 LEDMatrix[4] = LEDMatrix[4] | 8; 
 LEDMatrix[4] = LEDMatrix[4] | 4; 
 LEDMatrix[4] = LEDMatrix[4] | 64; 
 LEDMatrix[4] = LEDMatrix[4] | 32; 
}

void writedigit2(byte LEDMatrix[], int newNum){
   switch ( newNum ) {
    case 0:
    writedigit2_0(LEDMatrix);   
    break; 
    case 1:
    writedigit2_1(LEDMatrix);   
    break;     
    case 2:
    writedigit2_2(LEDMatrix);   
    break;     
    case 3:
    writedigit2_3(LEDMatrix);   
    break;     
    case 4:
    writedigit2_4(LEDMatrix);   
    break;     
    case 5:
    writedigit2_5(LEDMatrix);   
    break;
    case 6:
    writedigit2_6(LEDMatrix);   
    break; 
    case 7:
    writedigit2_7(LEDMatrix);   
    break; 
    case 8:
    writedigit2_8(LEDMatrix);   
    break; 
    case 9:
    writedigit2_9(LEDMatrix);   
    break;     
  }
 
}

void writedigit3_0(byte LEDMatrix[]){
 LEDMatrix[3] = LEDMatrix[3] | 1;
 LEDMatrix[2] = LEDMatrix[2] | 8;
 LEDMatrix[2] = LEDMatrix[2] | 16;
 LEDMatrix[2] = LEDMatrix[2] | 32;
 LEDMatrix[2] = LEDMatrix[2] | 128;
 LEDMatrix[2] = LEDMatrix[2] | 64;
}

void writedigit3_1(byte LEDMatrix[]){
 LEDMatrix[2] = LEDMatrix[2] | 64;
 LEDMatrix[2] = LEDMatrix[2] | 128;
}

void writedigit3_2(byte LEDMatrix[]){
 LEDMatrix[3] = LEDMatrix[3] | 1;
 LEDMatrix[2] = LEDMatrix[2] | 128; 
 LEDMatrix[2] = LEDMatrix[2] | 4; 
 LEDMatrix[2] = LEDMatrix[2] | 16;
 LEDMatrix[2] = LEDMatrix[2] | 32; 
}

void writedigit3_3(byte LEDMatrix[]){
 LEDMatrix[3] = LEDMatrix[3] | 1;
 LEDMatrix[2] = LEDMatrix[2] | 128; 
 LEDMatrix[2] = LEDMatrix[2] | 4; 
 LEDMatrix[2] = LEDMatrix[2] | 64;
 LEDMatrix[2] = LEDMatrix[2] | 32; 
}

void writedigit3_4(byte LEDMatrix[]){
 LEDMatrix[2] = LEDMatrix[2] | 8;
 LEDMatrix[2] = LEDMatrix[2] | 128; 
 LEDMatrix[2] = LEDMatrix[2] | 4; 
 LEDMatrix[2] = LEDMatrix[2] | 64;
}

void writedigit3_5(byte LEDMatrix[]){
 LEDMatrix[3] = LEDMatrix[3] | 1;
 LEDMatrix[2] = LEDMatrix[2] | 8; 
 LEDMatrix[2] = LEDMatrix[2] | 4; 
 LEDMatrix[2] = LEDMatrix[2] | 64;
 LEDMatrix[2] = LEDMatrix[2] | 32; 
}

void writedigit3_6(byte LEDMatrix[]){
 LEDMatrix[3] = LEDMatrix[3] | 1;
 LEDMatrix[2] = LEDMatrix[2] | 8; 
 LEDMatrix[2] = LEDMatrix[2] | 4; 
 LEDMatrix[2] = LEDMatrix[2] | 16;
 LEDMatrix[2] = LEDMatrix[2] | 32; 
 LEDMatrix[2] = LEDMatrix[2] | 64; 
}

void writedigit3_7(byte LEDMatrix[]){
 LEDMatrix[3] = LEDMatrix[3] | 1; 
 LEDMatrix[2] = LEDMatrix[2] | 128; 
 LEDMatrix[2] = LEDMatrix[2] | 64; 
}

void writedigit3_8(byte LEDMatrix[]){
 LEDMatrix[3] = LEDMatrix[3] | 1;
 LEDMatrix[2] = LEDMatrix[2] | 8; 
 LEDMatrix[2] = LEDMatrix[2] | 128; 
 LEDMatrix[2] = LEDMatrix[2] | 4;
 LEDMatrix[2] = LEDMatrix[2] | 16; 
 LEDMatrix[2] = LEDMatrix[2] | 64; 
 LEDMatrix[2] = LEDMatrix[2] | 32; 
}

void writedigit3_9(byte LEDMatrix[]){
 LEDMatrix[3] = LEDMatrix[3] | 1;
 LEDMatrix[2] = LEDMatrix[2] | 8; 
 LEDMatrix[2] = LEDMatrix[2] | 128; 
 LEDMatrix[2] = LEDMatrix[2] | 4;
 LEDMatrix[2] = LEDMatrix[2] | 64; 
 LEDMatrix[2] = LEDMatrix[2] | 32; 
}

void writedigit3(byte LEDMatrix[], int newNum){
   switch ( newNum ) {
    case 0:
    writedigit3_0(LEDMatrix);   
    break; 
    case 1:
    writedigit3_1(LEDMatrix);   
    break;     
    case 2:
    writedigit3_2(LEDMatrix);   
    break;     
    case 3:
    writedigit3_3(LEDMatrix);   
    break;     
    case 4:
    writedigit3_4(LEDMatrix);   
    break;     
    case 5:
    writedigit3_5(LEDMatrix);   
    break;
    case 6:
    writedigit3_6(LEDMatrix);   
    break; 
    case 7:
    writedigit3_7(LEDMatrix);   
    break; 
    case 8:
    writedigit3_8(LEDMatrix);   
    break; 
    case 9:
    writedigit3_9(LEDMatrix);   
    break;     
  }
 
}



void writedigit4_0(byte LEDMatrix[]){
 LEDMatrix[1] = LEDMatrix[1] | 1; 
 LEDMatrix[0] = LEDMatrix[0] | 8; 
 LEDMatrix[0] = LEDMatrix[0] | 128; 
 LEDMatrix[0] = LEDMatrix[0] | 16; 
 LEDMatrix[0] = LEDMatrix[0] | 64; 
 LEDMatrix[0] = LEDMatrix[0] | 32; 
}

void writedigit4_1(byte LEDMatrix[]){
 LEDMatrix[0] = LEDMatrix[0] | 128; 
 LEDMatrix[0] = LEDMatrix[0] | 64;
}

void writedigit4_2(byte LEDMatrix[]){
 LEDMatrix[1] = LEDMatrix[1] | 1; 
 LEDMatrix[0] = LEDMatrix[0] | 128; 
 LEDMatrix[0] = LEDMatrix[0] | 4; 
 LEDMatrix[0] = LEDMatrix[0] | 16; 
 LEDMatrix[0] = LEDMatrix[0] | 32; 
}

void writedigit4_3(byte LEDMatrix[]){
 LEDMatrix[1] = LEDMatrix[1] | 1; 
 LEDMatrix[0] = LEDMatrix[0] | 128; 
 LEDMatrix[0] = LEDMatrix[0] | 4; 
 LEDMatrix[0] = LEDMatrix[0] | 64; 
 LEDMatrix[0] = LEDMatrix[0] | 32; 
}

void writedigit4_4(byte LEDMatrix[]){
 LEDMatrix[0] = LEDMatrix[0] | 8; 
 LEDMatrix[0] = LEDMatrix[0] | 128; 
 LEDMatrix[0] = LEDMatrix[0] | 4; 
 LEDMatrix[0] = LEDMatrix[0] | 64; 
}

void writedigit4_5(byte LEDMatrix[]){
 LEDMatrix[1] = LEDMatrix[1] | 1; 
 LEDMatrix[0] = LEDMatrix[0] | 8; 
 LEDMatrix[0] = LEDMatrix[0] | 4; 
 LEDMatrix[0] = LEDMatrix[0] | 64; 
 LEDMatrix[0] = LEDMatrix[0] | 32; 
}

void writedigit4_6(byte LEDMatrix[]){
 LEDMatrix[1] = LEDMatrix[1] | 1; 
 LEDMatrix[0] = LEDMatrix[0] | 16; 
 LEDMatrix[0] = LEDMatrix[0] | 8; 
 LEDMatrix[0] = LEDMatrix[0] | 4; 
 LEDMatrix[0] = LEDMatrix[0] | 64; 
 LEDMatrix[0] = LEDMatrix[0] | 32; 
}

void writedigit4_7(byte LEDMatrix[]){
 LEDMatrix[1] = LEDMatrix[1] | 1; 
 LEDMatrix[0] = LEDMatrix[0] | 128; 
 LEDMatrix[0] = LEDMatrix[0] | 64; 
 }

void writedigit4_8(byte LEDMatrix[]){
 LEDMatrix[1] = LEDMatrix[1] | 1; 
 LEDMatrix[0] = LEDMatrix[0] | 16; 
 LEDMatrix[0] = LEDMatrix[0] | 8; 
 LEDMatrix[0] = LEDMatrix[0] | 4; 
 LEDMatrix[0] = LEDMatrix[0] | 64; 
 LEDMatrix[0] = LEDMatrix[0] | 32; 
 LEDMatrix[0] = LEDMatrix[0] | 128; 
}

void writedigit4_9(byte LEDMatrix[]){
 LEDMatrix[1] = LEDMatrix[1] | 1; 
 LEDMatrix[0] = LEDMatrix[0] | 128; 
 LEDMatrix[0] = LEDMatrix[0] | 8; 
 LEDMatrix[0] = LEDMatrix[0] | 4; 
 LEDMatrix[0] = LEDMatrix[0] | 64; 
 LEDMatrix[0] = LEDMatrix[0] | 32; 
}

void writedigit4(byte LEDMatrix[], int newNum){
   switch ( newNum ) {
    case 0:
    writedigit4_0(LEDMatrix);   
    break; 
    case 1:
    writedigit4_1(LEDMatrix);   
    break;     
    case 2:
    writedigit4_2(LEDMatrix);   
    break;     
    case 3:
    writedigit4_3(LEDMatrix);   
    break;     
    case 4:
    writedigit4_4(LEDMatrix);   
    break;     
    case 5:
    writedigit4_5(LEDMatrix);   
    break;
    case 6:
    writedigit4_6(LEDMatrix);   
    break; 
    case 7:
    writedigit4_7(LEDMatrix);   
    break; 
    case 8:
    writedigit4_8(LEDMatrix);   
    break; 
    case 9:
    writedigit4_9(LEDMatrix);   
    break;     
  }
 
}

void updateLED(byte LEDMatrix[]){

  digitalWrite(10,LOW);                
  SPI.transfer(B01000000);             //COMMAND 2: DATA SETTING COMMANDS
  digitalWrite(10,HIGH);
  //delay(10);

  digitalWrite(10,LOW);                //  Drop SPI chip-select to 0 (Arduino pin 10)
  SPI.transfer(B11000000);             //COMMAND 3: ADDRESS SETTING COMMANDS
  for (int i = 0; i<8; i++){
    SPI.transfer(LEDMatrix[i]);             //CDATA
  }
  digitalWrite(10,HIGH);

}

void clearLED(){
  
  digitalWrite(10,LOW);                
  SPI.transfer(B01000000);             //COMMAND 2: DATA SETTING COMMANDS
  digitalWrite(10,HIGH);
  //delay(10);

  digitalWrite(10,LOW);                //  Set SPI chip-select to 0 (Arduino pin 10)
  SPI.transfer(B11000000);             //COMMAND 3: ADDRESS SETTING COMMANDS
  SPI.transfer(B00000000);
  digitalWrite(10,HIGH);

  digitalWrite(10,LOW);                
  SPI.transfer(B01000000);             //COMMAND 2: DATA SETTING COMMANDS
  digitalWrite(10,HIGH);
  //delay(10);

  digitalWrite(10,LOW);                //  Set SPI chip-select to 0 (Arduino pin 10)
  SPI.transfer(B11000010);             //COMMAND 3: ADDRESS SETTING COMMANDS
  SPI.transfer(B00000000);
  digitalWrite(10,HIGH);

}

void clearMatrix(byte LEDMatrix[]){
  for (int i = 0; i<8; i++){
    LEDMatrix[i] = 0;
  }
}

void printdigit(int Num){
	byte LEDMatrix [8] = {
        0,0,0,0,0,0,0,0      };

      writedigit1(LEDMatrix, (Num/1000)%10);  // months 10's place
      writedigit2(LEDMatrix, (Num/100)%10);  // months 1's place
      writedigit3(LEDMatrix, (Num/10%10));  // days 10's place
      writedigit4(LEDMatrix, Num%10);  // days 1's place

      updateLED(LEDMatrix);
}

void updateLED2(byte LEDMatrix[])
{
  digitalWrite(10,LOW);       
  SPI.transfer(B01000000);             //COMMAND 2: DATA SETTING COMMANDS
  digitalWrite(10,HIGH);
  //delay(10);
  digitalWrite(10,LOW);                //  Drop SPI chip-select to 0 (Arduino pin 10)
  SPI.transfer(B11000010);             //COMMAND 3: ADDRESS SETTING COMMANDS
   
  for (int i = 0; i<8; i++){
    SPI.transfer(LEDMatrix[i]);             //CDATA
  }
  //SPI.transfer(B11111111);
  digitalWrite(10,HIGH); 
}

void writecolLED1(byte LEDMatrix[]){
 LEDMatrix[6] = LEDMatrix[6] | 4; 
}

void writecolLED2(byte LEDMatrix[]){
 LEDMatrix[6] = LEDMatrix[6] | 8; 
}

void writecolLED3(byte LEDMatrix[]){
 LEDMatrix[6] = LEDMatrix[6] | 16; 
}

void writecolLED4(byte LEDMatrix[]){
 LEDMatrix[6] = LEDMatrix[6] | 32; 
}

void writecolrew(byte LEDMatrix[]){
 LEDMatrix[7] = LEDMatrix[7] | 1; 
}

void writecolrec(byte LEDMatrix[]){ 
 LEDMatrix[6] = LEDMatrix[6] | 128; 
}

void writecolvcr(byte LEDMatrix[]){
 LEDMatrix[6] = LEDMatrix[6] | 64; 
}

void writecolmin(byte LEDMatrix[]){
 LEDMatrix[6] = LEDMatrix[6] | 1; 
}

void writecolon(byte LEDMatrix[]){
 LEDMatrix[2] = LEDMatrix[2] | 1; 
}

void writeam(byte LEDMatrix[]){
 LEDMatrix[0] = LEDMatrix[0] | 1;
}
void writetimer(byte LEDMatrix[]){
 LEDMatrix[0] = LEDMatrix[0] | 2;
}

#endif
