Current working Arduino Code

#include  // for the Bluetooth module

#include  // for the RFID module

#define SS_PIN 10

#define RST_PIN 9

String uidString;

MFRC522 rfid(SS_PIN, RST_PIN);

SoftwareSerial BLE_Serial(0, 1); // RX, TX

void setup() {

  Serial.begin(9600);

  BLE_Serial.begin(9600);

  SPI.begin(); 

  rfid.PCD_Init();

  Serial.println(&#34;Waiting for command...&#34;);

  BLE_Serial.println(&#34;Waiting for command...&#34;);

}

void loop() {

  if (rfid.PICC_IsNewCardPresent()) {

    readRFID();

  }

  if (BLE_Serial.available()) {

    //char data = BLE_Serial.read();

    // Serial.println(&#34;Hello I am debug&#34;);

    if (rfid.PICC_IsNewCardPresent()) {

      readRFID();

    }

    else {

      // Serial.println(&#34;I am not connected to Bluetooth&#34;);

    }

    delay(10);

  }

}

void readRFID() {

  rfid.PICC_ReadCardSerial();

  Serial.print(&#34;Tag UID: &#34;);

  uidString = String(rfid.uid.uidByte[0]) + &#34; &#34; + String(rfid.uid.uidByte[1]) + &#34; &#34; + 

    String(rfid.uid.uidByte[2]) + &#34; &#34; + String(rfid.uid.uidByte[3]);

  Serial.println(uidString);

  boolean authorized = false;

  char *name = &#34;&#34;;

  if (uidString == &#34;220 223 30 204&#34;) {

    authorized = true;

    name = &#34;KeyCard&#34;; 

  }

  if (uidString == &#34;243 154 6 14&#34;) {

    authorized = true;

    name = &#34;Bagtag&#34;; 

  }

  if (uidString == &#34;118 211 198 33&#34;) {

    authorized = true;

    name = &#34;George&#34;; 

  }

  if (authorized) {

    String message = &#34;You have successfully scanned &#34;;
    message += name;
    message += &#34;\n&#34;; // Add newline character for proper display

    Serial.println(message);
    BLE_Serial.print(message);
    Serial.println(&#34;Bluetooth message has been sent&#34;);
    delay(200);

  }

}