   else {
     val = 1;
   }
-  tm.setLed(led,val);  
+  tm.setLed(led,val,true);  
   delay(5);
 }
 

volatile byte pButton = 0;
volatile byte pOldButton = 255;

/* -----------------------SETUP ------------------------*/
void setup() {
  Serial.begin(38400);
  //optional:brightness(0:7),displayOn(0=off,1=on)
  tm.begin();
  //column,row,state(0,1)
  tm.setLed(0,1,1);
}

/* ---------------------- LOOP -------------------------*/
void loop() {
  randomLed2();
  if (buttonFired()){
    Serial.println("Click!");
  } 
}


boolean buttonFired(){
  uint16_t but = tm.getButtons();
  if (but != 0) {
    pButton = tm.decodeButton(but);
    if (pButton != 0){
      if (pOldButton != pButton){
        pOldButton = pButton;
        Serial.println(pButton,DEC);
        return true;
      }
    } 
    else {
      return false;
    }
  }
  else {
    return false;
  }
}



//this use column,row led addressing
void randomLed1(){

  else {
    val = 1;
  }
  tm.setLed(col,row,val,true);
  delay(5);
}

