 }
 
 
+//------------------------------------------------------------------------------------------------
+
 void sendHexByte(byte val)
 {
   Serial.write(tohexch(val>>4)); // high nybble

}


void sendCardReport(byte type, byte* pData, byte len)
{
  Serial.write(":"); // Start char

  sendCardReport(REPORT_OK_BOOT, NULL, 0);
}


//------------------------------------------------------------------------------------------------

void loop()
{  
  //readPins
  byte freg = (digitalRead(REG) ? REG_PAPER : REG_HOLE);
  //TODO: read from PORTB as a single byte
  //TODO: run through crossbar if pins need remapping
  byte now  = (digitalRead(D7)  ? ALL_PAPER : ALL_HOLES);

  // Show live diagnostics on LEDs
