       {
         sendCardReport(REPORT_OK_CARD, card, CARD_ROWS);
         state = STATE_NOCARD;
-        //Serial.println(state);
       }
     break;
     

// Pinouts for Sparkfun ProMicro:
// https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/hardware-overview-pro-micro

#define NUM_CHANNELS 9
#define REG          2  
#define D7           3 
//#define D6           A2  // A2

  sendCardReport(REPORT_OK_BOOT, NULL, 0);
}

void loop()
{  
  //readPins
  byte freg = (digitalRead(REG) ? REG_PAPER : REG_HOLE);
  byte now  = (digitalRead(D7)  ? ALL_PAPER : ALL_HOLES);

  // Show live diagnostics on LEDs
  writeLEDs(freg, now);


  // crank round the acquisition state machine
  switch (state)
  {
    case STATE_NOCARD:
      // stay here while freg=hole and data=all holes (card removed)
      if ((freg == REG_PAPER) || now != ALL_HOLES)
      { // at least one sensor has seen paper
        state = STATE_INSERTING;
      } 
    break;
    
