Arduino bleibt "hängen" trotz mircosoft-free

"Die Wörter" für den LEDs

/* For the LED code below to work, the LEDs need to be wired in a very specific way
 
 Normally a MAX7221's matrix is wired this way (8x8)
 
 dp| a| b| c| d| e| f| g
 0
 1
 2
 4
 5
 6
 7
 
 However, since the clock is 10x11 we wire 2x MAX7221 this way.
 Essentially, row 5,6,7 is transposed into column 9,10,11
 
 [dp,5]                         [g,5]
 -----------------------------------
 dp| a| b| c| d| e| f| g| 5| 6| 7
 0                       |         e - 5
 1                       |         d - 4
 2                       |         c - 3
 3                       |         b - 2
 4                       |         a - 1
 -----------------------------------
 dp| a| b| c| d| e| f| g| 5| 6| 7
 0                       |         e
 1                       |         d
 2                       |         c
 3                       |         b
 4                       |         a
 ------------------------------------
 [dp,5]                         [g,5]
 
 */
// void setLed(int addr, int row, int col, boolean state);
// void setRow(int addr, int row, byte);

// LED Turn on/off procedures
void LED_CLEAR() {
  LC.clearDisplay(0);
  LC.clearDisplay(1);
}

void Alle_An(){
  LC.setRow(0,0,B11111111);  
  LC.setRow(0,1,B11111111);  
  LC.setRow(0,2,B11111111);  
  LC.setRow(0,3,B11111111);  
  LC.setRow(0,4,B11111111);  
  LC.setRow(0,5,B11111111);  
  LC.setRow(0,6,B11111111);  
  LC.setRow(0,7,B11111111);  
  LC.setRow(1,0,B11111111);  
  LC.setRow(1,1,B11111111);    
  LC.setRow(1,2,B11111111);  
  LC.setRow(1,3,B11111111);   
  LC.setRow(1,4,B11111111);    
  LC.setRow(1,5,B11111111);    
  LC.setRow(1,6,B11111111);    
  LC.setRow(1,7,B11111111);  
}

void W_ESIST() {
  LC.setRow(0,0,B11011100);  // ES IST
}

void M_FUENF() {
  LC.setLed(0,0,7, true); // F
  LC.setLed(0,5,5, true); // Ü
  LC.setLed(0,6,5, true); // N
  LC.setLed(0,7,5, true); // F
}

void M_ZEHN() {
  LC.setRow(0,1,B11110000);  // ZEHN
}


void M_ZWANZIG () {
  LC.setRow(0,1,B00001111);  //ZWAN
  LC.setLed(0,5,4,true);      // Z
  LC.setLed(0,6,4,true);      // I
  LC.setLed(0,7,4,true);      // G
}

void M_VIERTEL () {
  LC.setRow(0,2,B00001111);  //VIER
  LC.setLed(0,5,3,true);// T
  LC.setLed(0,6,3,true);// E
  LC.setLed(0,7,3,true);// L
}

void W_NACH () {
  LC.setRow(0,3,B00111100);  //NACH
}

void W_VOR () {
  LC.setRow(0,3,B00000011);  //VO
  LC.setLed(0,5,2,true);// R
}


void M_HALB() {
  LC.setLed(0,4,0,true); //H
  LC.setLed(0,4,1,true); //A
  LC.setLed(0,4,2,true); //L
  LC.setLed(0,4,3,true); //B
}

void H_ZWOELF(){
  LC.setLed(0,4,5,true); //Z
  LC.setLed(0,4,6,true); //W
  LC.setLed(0,4,7,true); //Ö
  LC.setLed(0,5,1,true);// L
  LC.setLed(0,6,1,true);// F
}

void H_ZWEI(){
  LC.setRow(1,0,B11110000);  //ZWEI
}

void H_EIN(){
  LC.setRow(1,0,B00111000);  //EIN
}

void H_EINS(){
  LC.setRow(1,0,B00111100);  //EINS
}

void H_SIEBEN(){
  LC.setRow(1,0,B00000111);  //SIE
  LC.setLed(1,5,5,true);// B
  LC.setLed(1,6,5,true);// E
  LC.setLed(1,7,5,true);// N
}

void H_DREI(){
  LC.setRow(1,1,B01111000);  //DREI
}

void H_FUENF(){
  LC.setRow(1,1,B00000001);  //F
  LC.setLed(1,5,4,true);// Ü
  LC.setLed(1,6,4,true);// N
  LC.setLed(1,7,4,true);// F
}

void H_ELF () {
  LC.setRow(1,2,B11100000);  //ELF
}

void H_NEUN (){
  LC.setRow(1,2,B00011110);  //NEUN
}

void H_VIER (){
  LC.setRow(1,2,B00000001);  //V
  LC.setLed(1,5,3,true);  // I
  LC.setLed(1,6,3,true);  // E
  LC.setLed(1,7,3,true);  // R
}

void H_ACHT (){
  LC.setRow(1,3,B01111000);  //ACHT 
}

void H_ZEHN () {
  LC.setRow(1,3,B00000111);  //ZEH 
  LC.setLed(1,5,2,true);  // N
}

void H_SECHS(){
  LC.setRow(1,4,B01111100);  //SECHS
}

void W_UHR(){
  LC.setLed(1,5,1,true);  // U
  LC.setLed(1,6,1,true);  // H
  LC.setLed(1,7,1,true);  // R

}

void P_EINS() {
  LC.setLed(0,5,0,true); // top left
}
void P_ZWEI() {
  LC.setLed(0,5,0,true); // top left
  LC.setLed(0,5,7,true); // top right
}
void P_DREI() {
  LC.setLed(0,5,0,true); // top left
  LC.setLed(0,5,7,true); // top right
  LC.setLed(1,5,7,true);// bottom right
}
void P_VIER() {
  LC.setLed(0,5,0,true); // top left
  LC.setLed(0,5,7,true); // top right
  LC.setLed(1,5,7,true);// bottom right
  LC.setLed(1,5,0,true); // bottom left
}

void R_CLEAR() {
  LC.setColumn(0,6,B00000000);
  LC.setColumn(0,7,B00000000);
  LC.setRow(0,5,B00000000);
  LC.setRow(0,6,B00000000);
  LC.setRow(0,7,B00000000);
  LC.setColumn(1,6,B00000000);
  LC.setColumn(1,7,B00000000);
  LC.setRow(1,5,B00000000);
  LC.setRow(1,6,B00000000);
  LC.setRow(1,7,B00000000);

}



// SECONDS COUNTER MODE
void L_ZERO(){
  LC.setRow(0,2,B01110000);
  LC.setRow(0,3,B10001000);
  LC.setRow(0,4,B10011000);
  LC.setRow(1,0,B10101000);
  LC.setRow(1,1,B11001000);
  LC.setRow(1,2,B10001000);
  LC.setRow(1,3,B01110000);
}

void L_ONE(){
  LC.setRow(0,2,B00100000);
  LC.setRow(0,3,B01100000);
  LC.setRow(0,4,B00100000);
  LC.setRow(1,0,B00100000);
  LC.setRow(1,1,B00100000);
  LC.setRow(1,2,B00100000);
  LC.setRow(1,3,B01110000);
}
void L_TWO(){
  LC.setRow(0,2,B01110000);
  LC.setRow(0,3,B10001000);
  LC.setRow(0,4,B00001000);
  LC.setRow(1,0,B00010000);
  LC.setRow(1,1,B00100000);
  LC.setRow(1,2,B01000000);
  LC.setRow(1,3,B11111000);
}
void L_THREE(){
  LC.setRow(0,2,B11111000);
  LC.setRow(0,3,B00010000);
  LC.setRow(0,4,B00100000);
  LC.setRow(1,0,B00010000);
  LC.setRow(1,1,B00001000);
  LC.setRow(1,2,B10001000);
  LC.setRow(1,3,B01110000);
}
void L_FOUR(){
  LC.setRow(0,2,B00010000);
  LC.setRow(0,3,B00110000);
  LC.setRow(0,4,B01010000);
  LC.setRow(1,0,B10010000);
  LC.setRow(1,1,B11111000);
  LC.setRow(1,2,B00010000);
  LC.setRow(1,3,B00010000);
}
void L_FIVE(){
  LC.setRow(0,2,B11111000);
  LC.setRow(0,3,B10000000);
  LC.setRow(0,4,B10000000);
  LC.setRow(1,0,B11110000);
  LC.setRow(1,1,B00001000);
  LC.setRow(1,2,B10001000);
  LC.setRow(1,3,B01110000);
}
void R_ZERO(){
  LC.setColumn(0,6,B00011000);
  LC.setLed(0,2,7,true);
  LC.setLed(0,5,3,true);
  LC.setRow(0,6,B01010000);
  LC.setRow(0,7,B01100000);
  LC.setColumn(1,6,B11100000);
  LC.setColumn(1,7,B01010000);
  LC.setRow(1,5,B00100100);
  LC.setRow(1,6,B00100000);
  LC.setRow(1,7,B00011100);
}
void R_ONE(){
  LC.setLed(0,3,7,true);
  LC.setRow(0,5,B01110000);
  LC.setRow(1,5,B00111100);
  LC.setLed(1,3,7,true);
  LC.setLed(1,6,2,true);
}
void R_TWO(){
  LC.setLed(0,3,6,true);
  LC.setLed(0,2,7,true);
  LC.setLed(0,5,3,true);
  LC.setLed(0,6,3,true);
  LC.setRow(0,7,B01100000);

  LC.setLed(1,3,6,true);
  LC.setColumn(1,7,B00110000);
  LC.setRow(1,5,B00101000);
  LC.setRow(1,6,B00100100);
  LC.setLed(1,7,2,true);
}

void R_THREE(){
  LC.setLed(0,2,6,true);
  LC.setLed(0,2,7,true);
  LC.setRow(0,5,B01010000);
  LC.setRow(0,6,B00110000);
  LC.setLed(0,7,3,true);

  LC.setLed(1,2,6,true);
  LC.setLed(1,3,7,true);
  LC.setLed(1,5,2,true);
  LC.setRow(1,6,B00100100);
  LC.setRow(1,7,B00011000);
}

void R_FOUR(){
  LC.setLed(0,4,7,true);
  LC.setLed(0,5,2,true);
  LC.setRow(0,6,B01110000);

  LC.setColumn(1,6,B11000000);
  LC.setLed(1,1,7,true);
  LC.setLed(1,5,4,true);
  LC.setRow(1,6,B00111100);
  LC.setLed(1,7,4,true);
}

void R_FIVE(){
  LC.setColumn(0,6,B00111000);
  LC.setLed(0,2,7,true);
  LC.setLed(0,5,3,true);
  LC.setLed(0,6,3,true);
  LC.setLed(0,7,3,true);

  LC.setColumn(1,6,B10100000);
  LC.setColumn(1,7,B10010000);
  LC.setRow(1,5,B00100100);
  LC.setRow(1,6,B00100100);
  LC.setRow(1,7,B00011000);
}

void R_SIX(){
  LC.setLed(0,4,6,true);
  LC.setLed(0,3,7,true);
  LC.setLed(0,5,3,true);
  LC.setLed(0,6,3,true);

  LC.setColumn(1,6,B11100000);
  LC.setColumn(1,7,B10010000);
  LC.setRow(1,5,B00100100);
  LC.setRow(1,6,B00100100);
  LC.setRow(1,7,B00011000);	
}

void R_SEVEN(){
  LC.setLed(0,2,6,true);
  LC.setLed(0,2,7,true);
  LC.setLed(0,5,3,true);
  LC.setRow(0,6,B01010000);
  LC.setRow(0,7,B00110000);

  LC.setColumn(1,7,B01110000);
  LC.setLed(1,5,5,true);
}

void R_EIGHT(){
  LC.setColumn(0,6,B00011000);
  LC.setLed(0,2,7,true);
  LC.setLed(0,5,3,true);
  LC.setLed(0,6,3,true);
  LC.setRow(0,7,B01100000);

  LC.setColumn(1,6,B01100000);
  LC.setColumn(1,7,B10010000);
  LC.setRow(1,5,B00100100);
  LC.setRow(1,6,B00100100);
  LC.setRow(1,7,B00011000);	
}

void R_NINE(){
  LC.setColumn(0,6,B00011000);
  LC.setLed(0,2,7,true);
  LC.setLed(0,5,3,true);
  LC.setLed(0,6,3,true);
  LC.setRow(0,7,B01100000);

  LC.setColumn(1,7,B10010000);
  LC.setRow(1,5,B00100100);
  LC.setRow(1,6,B00010100);
  LC.setRow(1,7,B00001100);
}

// for dot mode - clear the 4 dots only.
void P_CLEAR() {
  LC.setLed(0,5,0,false); // top left
  LC.setLed(0,5,7,false); // top right
  LC.setLed(1,5,0,false); // top left	
  LC.setLed(1,5,7,false); // bottom right
}