esp8266-201 and rc522

hello there!i m trying this post,to connect esp8266-201 and rc522 rfid reader and also connect esp to cayenne.until now i ve tried this code.

#include <ESP8266WiFi.h>
#include <SPI.h>
#include <BlynkSimpleEsp8266.h>
#include "CayenneDefines.h"
#include "CayenneWiFiClient.h""
#include "MFRC522.h"

#define RST_PIN  15 // RST-PIN für RC522 - RFID - SPI - Modul GPIO15 
#define SS_PIN  2 // SDA-PIN für RC522 - RFID - SPI - Modul GPIO2 

// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token[] = "";
// Your network name and password.
char ssid[] = "";
char password[] = "";


MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance

void setup() {

SPI.begin();  // Init SPI bus
mfrc522.PCD_Init(); // Init MFRC522

Cayenne.begin(token, ssid, password);


}

void loop() { 
// Look for new cards
if ( ! mfrc522.PICC_IsNewCardPresent()) {
delay(50);
return;
}
// Select one of the cards
if ( ! mfrc522.PICC_ReadCardSerial()) {
delay(50);
return;
}
// Dump debug info about the card; PICC_HaltA() is automatically called
mfrc522.PICC_DumpToSerial(&(mfrc522.uid));
}

my problem is that if i read the code correctly it scans for a new card every time.i just want to add 2 cards and check if any of them was readed by the rfid reader,so it would make high or low 2 other pins,informing me for presence,like this code on this post (which i m trying to make)

#include <SoftwareSerial.h>                               //SoftwareSerial library required for Arduino communication with the Grove RFID reader and the Grove Serial MP3 player
#include <BlynkSimpleEsp8266.h>
#include "CayenneDefines.h"
#include "CayenneWiFiClient.h"
char token[] = "";
char ssid[] = "";
char password[] = "";

SoftwareSerial mp3(2,3);                                  
SoftwareSerial rfid(10,11);                               

int rfidValue = 0;                                        
int vPin6 = 0;                                          
int vPin7 = 0;                                            
unsigned long start_Time;                                 
unsigned long stop_Time;                                  
unsigned long time_Diff = 0;                             
boolean keyMessagePlayed=false;                           
boolean waitingForKey = true;                            
int songNumber = -1;                                      

void setup(){
  delay(2500);                                          
  mp3.begin(9600);                                        
  rfid.begin(9600);                                       
  
 Cayenne.begin(token, ssid, password);                                 
  setVolume(28);                                          
  setPlayMode(0x00);                                      
}

void loop(){
  Cayenne.run();                                        

  if(vPin6&&!vPin7){                                     
    if(!keyMessagePlayed){                                
      playSong(1);                                        
      keyMessagePlayed=true;                              
    }

      if(listenForKeys()){                                 
      //TRUE = Person Identified within 10 seconds
      playSong(songNumber);                               
      vPin6 = 0;                                          //Deactivate the "Person Detection" virtual pin (6).
      keyMessagePlayed=false;                            
    } else {
      //FALSE = Person not identified within 10 seconds
      playSong(2);                                       
      delay(4000);                                        //A FOUR second delay is required to allow the message to play, before the alarm sounds.
      playSong(3);                                        
      delay(8000);                                        
      playSong(99);                                       //Playing a non-existing track essentially STOPS the MP3 player.
      vPin7=1;                                            //ACTIVATE Virtual Pin 7 - Intruder Detected
      keyMessagePlayed=false;                             //Reset the keyMessagePlayed variable for future detections.
    }

    upDateCayenne();                                      
  } 
}



void writeToMP3(byte MsgLEN, byte A, byte B, byte C, byte D, byte E, byte F){
  byte codeMsg[] = {MsgLEN, A,B,C,D,E,F};
  mp3.write(0x7E);                                        
  for(byte i = 0; i<MsgLEN+1; i++){
    mp3.write(codeMsg[i]);                               
  }
}


void setVolume(byte Volume){                                                
  byte tempVol = constrain(Volume, 0, 31);               
  writeToMP3(0x03, 0xA7, tempVol, 0x7E, 0x00, 0x00, 0x00); 
}

/*=setPlayMode function
 */
void setPlayMode(byte playMode){     
  writeToMP3(0x03, 0xA9, playMode, 0x7E, 0x00, 0x00, 0x00);  
}

/*=playSong function
 */
void playSong(byte songNum){                             
  writeToMP3(0x04, 0xA0, 0x00, songNum, 0x7E, 0x00, 0x00);            
}

/*=listenForKeys function
 * is used to identify the person detected.

boolean listenForKeys(){
  //reset some variables every time this function is called.
  songNumber = -1;
  start_Time = millis();
  time_Diff = 0;
  waitingForKey = true;
  rfidValue=0; 

  //Wait for a valid RFID tag for a maximum of 10 seconds
  while(time_Diff<10000 && waitingForKey){
     Cayenne.run();                                       //Make sure to stay in contact with the Cayenne Server while waiting for the RFID tag.
     stop_Time = millis();                          
     time_Diff = stop_Time - start_Time;                  //Measure the time elapsed.

     //If an RFID tag is detected by the Grove RFID reader, it will transmit a series of numbers related to the Tag ID.
     if(rfid.available()){
        while(rfid.available()){                          //Make sure to read all of the numbers transmitted by the Grove RFID reader
          rfidValue += rfid.read();                       //You could employ a method to extract the exact RFID Tag ID - however just adding each number received -  produced a unique number that I could use to identify the person.
          delay(1);                                       //A small delay between reads - ensures you get all of the numbers from the RFID reader in one go.
        }
        Serial.println("RFID VALUE:");
        Serial.println(rfidValue);                        //Print the Unique RFID Tag value to the Serial monitor - useful for debugging

        
        //If a person has an RFID tag that can be identified in this list, then play a personalised message for that person.
        switch(rfidValue){
          case 628:                                       //Person #1 has a Tag that generates an rfidValue of 628.
            songNumber=4;                                 //File#4 (or message number 4) on the Grove MP3 player will be played when this person is detected.
            waitingForKey = false;                        //setting the "waitingForKey" variable to FALSE - will allow us to break out of the while loop (instead of waiting for a full 10 seconds).
            break;
          case 651:                                       //Person #2 has a Tag that generates an rfidValue of 651.
            songNumber=5;                                 //File#5 (or message number 5) on the Grove MP3 player will be played when this person is detected.
            waitingForKey = false;                        //setting the "waitingForKey" variable to FALSE - will allow us to break out of the while loop (instead of waiting for a full 10 seconds).
            break;
          case 694:                                       //Person #3 has a Tag that generates an rfidValue of 694.
            songNumber=6;                                 //File#6 (or message number 6) on the Grove MP3 player will be played when this person is detected.
            waitingForKey = false;                        //setting the "waitingForKey" variable to FALSE - will allow us to break out of the while loop (instead of waiting for a full 10 seconds).
            break;
          case 658:                                       //Person #4 has a Tag that generates an rfidValue of 658.
            default:
            waitingForKey = true;                         //If a person has not been identified, keep waiting for the key/tag until the times runs out.
            break;
        }
    }
  }

  /* If we are still waiting for an RFID tag (key) at this point, then we were unsuccessful in identifying the person within 10 seconds.
   *  Returning FALSE - will sound the alarm, and will activate Virtual Pin 7 (Intruder Alert).
   *  Returning TRUE - means that we have identified the person who triggered the sensors, and can therefore relax, and turn OFF the Security sensors.
   */
  if(waitingForKey){                                  
    return false;
  } else {
    return true;
  }
}

without having to play,or write to mp3.just check for the cards and activate pins.
any help on that?any ideas??(there are more code comments on the link i 've posted)