 
 cie_PN532 cie(PN532_SCK, PN532_MISO, PN532_MOSI, PN532_SS);
 Adafruit_7segment matrix = Adafruit_7segment();
+Servo servo;
 word count;
 
 void setup(void) {

  matrix.begin(0x70);
  count = 0;
  clearMatrix();
  Serial.println(F("PN532 initialized, waiting for a CIE card..."));
}


  byte buffer[EF_ID_SERVIZI_LENGTH];
  if (!cie.read_EF_ID_Servizi(buffer, &bufferLength)) {
    Serial.print(F("Error reading EF.ID_SERVIZI"));
    blinkRedLed();
    delay(100);
    return;
  }
  Serial.print(F("EF.ID_Servizi: "));
  cie.printHex(buffer, bufferLength);

  turnGreenLedOn();
  openTurnstile();
  printHi();
  count++;
  delay(1000);
  clearMatrix();
  delay(200);
  printId(buffer);
  delay(2000);
  turnGreenLedOff();
  closeTurnstile();
  printCount();
  


  Serial.println();
