I need alot of help with my errors with RFID code with millis

I just converted my original code to this code below to get rid of delay. But when I completed my code I just got error after error and it is doing my head in.

Please help me.

//RFID
#include <SPI.h>
#include <MFRC522.h>
#include <Servo.h>

#define SS_PIN 10
#define RST_PIN 9
#define LED_G 4 //define green LED pin
#define LED_R 5 //define red LED
#define BUZZER 2 //buzzer pin
MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance.
Servo myServo1; //define servo name
Servo myServo2;

void setup()
{
Serial.begin(9600); // Initiate a serial communication
SPI.begin(); // Initiate SPI bus
mfrc522.PCD_Init(); // Initiate MFRC522
myServo1.attach(3); //servo pin
myServo1.write(0); //servo start position
myServo2.attach(6);
myServo2.write(180);
pinMode(LED_G, OUTPUT);
pinMode(LED_R, OUTPUT);
pinMode(BUZZER, OUTPUT);
noTone(BUZZER);
Serial.println(“Put your card to the reader…”);
Serial.println();

}
void loop()
{
// Look for new cards
if ( ! mfrc522.PICC_IsNewCardPresent())
{
return;
}
// Select one of the cards
if ( ! mfrc522.PICC_ReadCardSerial())
{
return;
}
//Show UID on serial monitor
Serial.print(“UID tag :”);
String content= “”;
byte letter;
for (byte i = 0; i < mfrc522.uid.size; i++)
{
Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " “);
Serial.print(mfrc522.uid.uidByte[i], HEX);
content.concat(String(mfrc522.uid.uidByte[i] < 0x10 ? " 0” : " "));
content.concat(String(mfrc522.uid.uidByte[i], HEX));
}
Serial.println();
Serial.print("Message : ");
content.toUpperCase();
if (content.substring(1) == “41 A3 DE DB”||content.substring(1) == “D5 64 BF B0” || content.substring(1) == “01 02 03 04”) //change here the UID of the card/cards that you want to give access
{
Serial.println(“Authorized access”);
Serial.println();
delay(500);
digitalWrite(LED_G, HIGH);
tone(BUZZER, 500);
delay(300);
noTone(BUZZER);
myServo1.write(180);
myServo2.write(0);
delay(5000);
myServo1.write(0);
myServo2.write(180);
digitalWrite(LED_G, LOW);
}

else {
Serial.println(" Access denied");
digitalWrite(LED_R, HIGH);
tone(BUZZER, 300);
delay(1000);
digitalWrite(LED_R, LOW);
noTone(BUZZER);
}
}

Thanks for your time :sweat_smile:

Hi,

Please be more elaborate about your problem and what you are trying to achieve.
It seems you are using the MFRC522, what are the errors you are receiving?

Do you know that circuito.io provides a code for this component? did you try it?