RFID MFRC522 errors

I am brand new to Arduino programming and am having a difficult time getting my code to compile.

The goal is to create a puzzle with four readers and to compare the UID codes and readers against a known key. In other words, put the tags in the correct order and the puzzle will unlock. I have removed the unneeded PICC information, the LED and relay related code to simplify this but I cannot get past getting the UIDs associated with the variable RFID. I have tried byte, string and byte string. I searched the internet and tired a number of options and looked through the MFRC522 library but it is beyond my skill level.

My plan is to use the string value of RFID against Key to toggle the boolean Correct ID. Get it right and the LEDs and relay state change and the puzzle resets after a delay. Get it wrong and the led flashes and the loop continues.

Code is attached

Thank you

Elizabeth_Puzzle_6.ino (2.96 KB)

Here’s your loop function tweaked so that it will at least compile:

void loop()
{
  for (uint8_t reader = 0; reader < NR_OF_READERS; reader++)
  {
    // Look for new cards
    if (mfrc522[reader].PICC_IsNewCardPresent() && mfrc522[reader].PICC_ReadCardSerial())   //Look for new card
    {
      Serial.print(F("Reader ")); //Print Reeader
      Serial.print(reader); //Print reader #
      // Show some details of the PICC (that is: the tag/card)
      Serial.print(F(": Card UID:")); // Print UID
      dump_byte_array(mfrc522[reader].uid.uidByte, mfrc522[reader].uid.size ); // read the card info
      Serial.println();
      //Serial.print(F("PICC type: "));
      //MFRC522::PICC_Type piccType = mfrc522[reader].PICC_GetType(mfrc522[reader].uid.sak);
      //Serial.println(mfrc522[reader].PICC_GetTypeName(piccType));
      // Halt PICC
      mfrc522[reader].PICC_HaltA();
      // Stop encryption on PCD
      mfrc522[reader].PCD_StopCrypto1();
    }
  }
}

Thank you but I am still not seeing how I compare the serial dump to the correct key.