예제 #1
0
/*
  This function lights up a some Leds in a column.
 The pattern will be repeated on every column.
 The pattern will blink along with the column-number.
 column number 4 (index==3) will blink 4 times etc.
 */
void columns() {
  for(int col=0;col<8;col++) {
    delay(100);
    lc.setColumn(0,col,0b10100000);
    delay(100);
    lc.setColumn(0,col,(byte)0);
    for(int i=0;i<col;i++) {
      delay(100);
      lc.setColumn(0,col,0b10100000);
      delay(100);
      lc.setColumn(0,col,(byte)0);
    }
  }
}