   digitalWrite(LED_D1,  data&(1<<1));
   digitalWrite(LED_D0,  data&(1<<0));
 }
+
+void sendCard(byte* pData, byte len)
+{
+  for (byte i=0; i<len; i++)
+  {
+    Serial.print(pData[i]);
+    Serial.print(" ");
+  }
+  Serial.println();
+}
+
+
+

STATE state = STATE_REMOVED;

void loop()
{
  //delay(250);
  
  // Read all 9 inputs (roughly) at same time
  unsigned int reg = analogRead(A0);


// 81 - card length error (not 16 clocks)
// 82 - card data error (significantly different IN and OUT
//bits numbered from left, so D7 is on left next to REG hole


#define REGISTRATION A0
