i need help my coding for my fyp how my coding works = 1 rfid card detect on first rfid reader and 2 rfid card detect on second rfid reader after that servo go to 90
my second rfid not detect
this is my coding
#include &lt;SPI.h&gt;
#include &lt;MFRC522.h&gt;
#include &lt;Servo.h&gt;
Servo  myservo;
int pos = 0;
int angle = 0;
int angle11 = 0;

#define RST_PIN2           8          // Configurable, see typical pin layout above
#define SS_PIN           9          // Configurable, see typical pin layout above
#define SS_PIN2          10          // Configurable, see typical pin layout above



MFRC522 mfrc522(SS_PIN, RST_PIN2 );   // Create MFRC522 instance.
MFRC522 mfrc522_2(SS_PIN2, RST_PIN2);   // Create MFRC522 instance.

 
void setup() 
{
  Serial.begin(9600); // Initialize serial communications with the PC
  SPI.begin();        // Init SPI bus
  mfrc522.PCD_Init(); // Init MFRC522 card
  mfrc522_2.PCD_Init(); // Init MFRC522 card
  Serial.println(&quot;Approximate your card to the reader...&quot;);
  Serial.println();
   myservo.attach(5);
 



}
void loop() 
 {

// Look for new cards

if ( ! mfrc522.PICC_IsNewCardPresent()) {

return;

}

 // Select one of the cards

if ( ! mfrc522.PICC_ReadCardSerial()) {

return;

}

// Dump debug info about the card; PICC_HaltA() is automatically called

mfrc522.PICC_DumpToSerial(&amp;(mfrc522.uid));

  delay(1000);
  // Look for new cards

  if ( ! mfrc522_2.PICC_IsNewCardPresent()) {

    return;

  }
  // Select one of the cards

  if ( ! mfrc522_2.PICC_ReadCardSerial()) {

    return;

    mfrc522_2.PICC_DumpToSerial(&amp;(mfrc522.uid));

  }

 
  //Show UID on serial monitor
  Serial.print(&quot;UID tag :&quot;);
  String content= &quot;&quot;;
  byte letter;
  for (byte i = 0; i &lt; mfrc522.uid.size; i++) 
  {
     Serial.print(mfrc522.uid.uidByte[i] &lt; 0x10 ? &quot; 0&quot; : &quot; &quot;);
     Serial.print(mfrc522.uid.uidByte[i], HEX);
     content.concat(String(mfrc522.uid.uidByte[i] &lt; 0x10 ? &quot; 0&quot; : &quot; &quot;));
     content.concat(String(mfrc522.uid.uidByte[i], HEX));
  }
  Serial.println();
  Serial.print(&quot;Message : &quot;);
  content.toUpperCase();
  if (content.substring(1) == &quot;09 99 55 B2&quot;) //change here the UID of the card/cards that you want to give access
 {
String content= &quot;1&quot;;
  byte letter;
  for (byte ii = 0; ii &lt; mfrc522_2.uid.size; ii++) 
  {
     Serial.print(mfrc522_2.uid.uidByte[ii] &lt; 0x10 ? &quot; 0&quot; : &quot;1 &quot;);
     Serial.print(mfrc522_2.uid.uidByte[ii], HEX);
     content.concat(String (mfrc522_2.uid.uidByte[ii] &lt; 0x10 ? &quot; 0&quot; : &quot;1 &quot;));
     content.concat(String (mfrc522_2.uid.uidByte[ii], HEX));
  }
  Serial.println();
  Serial.print(&quot;Message : &quot;);
  content.toUpperCase();
  if (content.substring(1) == &quot;09 99 55 B3&quot;) //change here the UID of the card/cards that you want to give access
 

      myservo.write(angle); delay(3000);
   for(angle = 0; angle &gt; 90; angle11) 
    myservo.write(angle11);           
    delay(3000); 
    
    myservo.write(angle11); delay(3000);
   for(angle = 90; angle11 &gt; 0; angle) 
    myservo.write(angle);           
    delay(3000); 
    }

 else  
 {
    Serial.println(&quot; Access denied&quot;);
    delay(3000);
    
    }
  }
Right at the start of your loop you have this (and other similar constructs):
if ( ! mfrc522.PICC_IsNewCardPresent()) {
    return;
}

That means that if no new card is present on reader 1 then the rest of the loop is ignored. Nothing else can happen.
You need to restructure your whole program so that it works in the complete opposite way - instead of saying &quot;If there's no card do nothing&quot; you should say &quot;If there is a card then do something&quot;.