  /* ===================================================================================
   *  RFID Reader Read
   * =================================================================================*/

  void rfid_begin() 
  {
    SPI.begin();      // Init SPI bus
    rfid.PCD_Init();  // Init MFRC522 
  }

  //====================================================================================

  String rfid_read()
  {
    String card = "";
    
    // Look for new cards
    if ( ! rfid.PICC_IsNewCardPresent())
      return "";
  
    // Verify if the NUID has been readed
    if ( ! rfid.PICC_ReadCardSerial())
      return "";
   
    // Store NUID into nuidPICC array
    for (byte i = 0; i < 4; i++) 
    {
      card += String(rfid.uid.uidByte[i], HEX);
    }

    // REMOVE UNWANTED SPACES
    card.trim();
  
    // CHANGE TO CAPITAL LETTERS
    card.toUpperCase();
  
    // Halt PICC
    rfid.PICC_HaltA();
  
    // Stop encryption on PCD
    rfid.PCD_StopCrypto1();

    // Return Card Data
    return card;
  }
