예제 #1
0
/*
 This function will light up every Led on the matrix.
 The led will blink along with the row-number.
 row number 4 (index==3) will blink 4 times etc.
 */
void single() {
  for(int row=0;row<8;row++) {
    for(int col=0;col<8;col++) {
      delay(100);
      lc.setLed(0,row,col,true);
      delay(100);
      for(int i=0;i<col;i++) {
        lc.setLed(0,row,col,false);
        delay(100);
        lc.setLed(0,row,col,true);
        delay(100);
      }
    }
  }
}
예제 #2
0
int contador (LedControl lc, int parametro, int unidad)  // enciende en el contador (columna) el numero de leds (niveles) de cada contador
  {
    for ( led=0; led<unidad; led++)
     { 
      lc.setLed(0,parametro,led,true);
     } 
  }
예제 #3
0
void encenderTodo(LedControl lc){
  
  for ( led=0; led<8; led++)
    {  
      for ( columna=0; columna<8; columna++)
      {
        lc.setLed(0,columna,led,true);
      }
    }
}
예제 #4
0
void apagarTodo(LedControl lc){
  
  for ( led=0; led<8; led++)
    {  
      for ( columna=0; columna<8; columna++)
      {
        lc.setLed(0,columna,led,false);
      }
    }
  
}