 }
 
 /*
- * Read trellis LEDs
+ * Read & Process trellis LEDs
  */
 
 void getMatrixInput() {

      Serial.println("STATE_ACK");
      digitalWrite(LED_UID, LOW);
      digitalWrite(LED_MSG, LOW);
      break;
    default:
      break;

  }
}

uint32_t encodeNibble(uint16_t val, uint8_t k) {
  uint8_t shift = validUserIDs[authenticatedUser][1];
  return (((val >> (4*k)) + shift) % 16) & 0x0F;
}

uint16_t encodeMessage() {
  uint16_t encodedMessage;

  for (int i = 0; i < 4 ; i++) {
    uint8_t position = (4*i);
    encodedMessage = (encodeNibble(matrixValue, i) << position) | encodedMessage;
  }

  return encodedMessage;
}

/*
 *  Big Button Press and Big Button LED control
 */
