RFIDuino not working on Uno R4 Wifi

I am trying to use the RFIDuino library and affiliated hardware (I know it's very outdated, but I am trying to avoid purchasing any additional hardware) and the script will not work on a Arduino Uno R4 Wifi when it will work on a Arduino Uno R3. The pinouts seem to be the same.

#include <RFIDuino.h>  //include the RFIDuino Library
#define SERIAL_PORT Serial  //Serial port definition for Geekduino, Arduino Uno, and most Arduino Boards


//Program to open door for Room 131


boolean tagCheck = false; //true when a tag has been read, false otherwise

RFIDuino myRFIDuino(1.1);  //initialize an RFIDuino object for hardware version 1.1

int myTags[1][5] = {  //Declares Tag Value of Valid Tags, tags are ordered same as in spreadsheet
  {85,0,46,147,158}
};  //Begin BackEnd

#define   RELAY 9               //the relay PinOut

void setup() {  //Setup Code
  SERIAL_PORT.begin(19200);  //Declare Baud rate for Arduino at 19200
  Serial.println("Begin");
  pinMode(RELAY, OUTPUT);     //The relay must be manuualy initalized as an output
  
  beep(2, 2);  //Beep the Arduino twice 

}

void beep(int bp, int gb) {  //Makes it beep
  int tkn = 0;
  if(gb == 1){
    myRFIDuino.successSound();
  }
  else if(gb == 0){
    myRFIDuino.errorSound();
  }
  else{
    for (tkn; tkn < bp; tkn++) {  //beeps inputed (bp) amount of time
      digitalWrite(myRFIDuino.buzzer, HIGH); delay(100); digitalWrite(myRFIDuino.buzzer, LOW); delay(100); 
    }
  }
}

void flash(int fls){  //Makes it Flash
  int tkn = 0;
  for (tkn; tkn < fls; tkn++) {  //beeps inputed (bp) amount of time
    digitalWrite(myRFIDuino.led2, HIGH); delay(50); digitalWrite(myRFIDuino.led2, LOW); delay(50); 
  }
}

byte tagData[5];  //Holds the ID numbers from the tag

int i = 0;  //Counting variable for counter function

void loop() {  //Main Loop Code
  tagCheck = myRFIDuino.decodeTag(tagData); //run the decodetag to check for the tag. If a tag is read then the function will return 'true' and load the data into 'tagData'  
  if (tagCheck==true) {  //if a 'true' is returned from the decodetag function, a tag was succesffuly scanned 
    check();  //Transfer to Scan Function
    tagCheck = false;
    delay(500);
  }
}

boolean goodScan = false;

void check(){  //Compares tag vs valid tags
  int i = 0;
  while(i < sizeof(myTags)/10){  //checks all tags that are in myTags array 
  //sizeof() reads array byte length, so a 5 long array of numbers, that are less than 256, will be two bytes times 5 numbers, 
  //thus each array is 10 in length, so sizeof(myTags) = 30. Dividing by 3 fixes this issue.
    //printTag();  //troubleshooting prints
    for (int n = 0; n < 5; n++) {  //Loop to check each digit in both the scanned and valid tag values
      if(tagData[n] == myTags[i][n]){  //Checks position n of each array
        goodScan = true;  //Returns true if matched
      }
      else{
        goodScan = false;  //Returns fasle if not
        break;  //Breaks loop, as value is not the same
      }
    }
    if(goodScan == true){
      break;  //breaks value if loop ends with a valid number
    }
    i++;
  }

  if(goodScan == true){
    beep(1, 1);
    digitalWrite(RELAY,HIGH);                   //turn the relay/solenoid off
    delay(1500);                                //Wait 1.5 seconds before closing relay/solenoid
    digitalWrite(RELAY,LOW);                    //turn the relay/solenoid off
    goodScan = false;
  }else{
    beep(1, 0);
    goodScan = false;
  }

}

Whenever plugged into power, the system should been twice, sometimes 4 times, to signify that the system is ready. However, when attached to the R4 Wifi, it does nothing. Also, whenever incorporating the RFIDuino system into other scripts, as soon as '''RFIDuino myRFIDuino(1.1);''' is declared, the program proceeds to break.

I had a quick look at a library that I think is the one you're using. Maybe. You didn't provide any link or anything. I didn't see anything that would make it incompatible.

Show us your wiring. Maybe there's an issue there.

My mistake, I thought I linked it. This is the library I am using. Further, I am not really using any wiring, I am using the hat created for this system. The manufacturers have since removed their tutorial on as of 9/3/24, but it can still be found.

When running the scripts, provided examples or otherwise, the Arduino R4 does nothing. The IDE does not throw any errors, but the Arduino becomes completely unresponsive until flashed with another program. I can put the same program on a Uno R3 and it will run perfectly fine, but on the Uno R4, it freezes. No output will be generated. I am using the same hat for both Unos as well.

Change Serial to Serial1. The R4 has a separate serial port for pins 0 and 1. Theyre not shared with Serial like the R3

I don't think that changing the Serial to Serial1 does anything, but I could be doing it wrong. Furthermore, even when removing the serial connections, pins 0 and 1, from the hat to the Uno R3, it continues to function perfectly fine, so the serial pins are not used.

Ok, lets appoach from the other direction.

How does the RFIduino communicate with the board it is mounted on? Is this SPI, Serial, I2C or what?

Based on a perfunctory look at RFIDuino.cpp "or what" would appear to be the answer. It looks like it's bit banging a Manchester decode.

It uses the following pins :

    //User Accessible Output
    buzzer = 5;
    led1 = 3;
    led2 = 2;

    //RFID related pins
    demodOut = 8;
    shd = 7;
    mod = 6;
    rdyClk = 4;

This can be modified, and the connections, through use of a breadboard and jumpers, can also be change to match the pin outs. If done, the same issue persists: Uno R3 runs fine, Uno R4 does not.