Printing two sensor values? noob

Hi, I'm developing a project that uses a rotary encoder and an rfid reader I have both working separately however I have no idea how to combine both of these scripts together so I can use these 2 separate sensor values in other programs I am using to complete this project. I'm just wondering could anyone point me in the right direction of what I'll need to learn to do this because coding isn't my strongest point. I'm working with an optical encoder so I'm not using any debouncing code.

Here is the encoder code I am working with:

int pulses, A_SIG=0, B_SIG=1;
int digitalInput5 = 5;  // change color
int value5 = '0';

void setup(){
  attachInterrupt(0, A_RISE, RISING);
  attachInterrupt(1, B_RISE, RISING);
  pinMode(digitalInput5,OUTPUT);

  Serial.begin(19200);
}//setup


void loop(){
  value5 = digitalRead(5);
   if (value5 ){
pulses=0;
}
  
  
}

void A_RISE(){
 detachInterrupt(0);
 A_SIG=1;
 
 if(B_SIG==0)
 pulses++;//moving forward
 if(B_SIG==1)
 pulses--;//moving reverse
 Serial.println(pulses);
 attachInterrupt(0, A_FALL, FALLING);
}

void A_FALL(){
  detachInterrupt(0);
 A_SIG=0;
 
 if(B_SIG==1)
 pulses++;//moving forward
 if(B_SIG==0)
 pulses--;//moving reverse
 Serial.println(pulses);
 attachInterrupt(0, A_RISE, RISING);  
}

void B_RISE(){
 detachInterrupt(1);
 B_SIG=1;
 
 if(A_SIG==1)
 pulses++;//moving forward
 if(A_SIG==0)
 pulses--;//moving reverse
 Serial.println(pulses);
 attachInterrupt(1, B_FALL, FALLING);
}

void B_FALL(){
 detachInterrupt(1);
 B_SIG=0;
 
 if(A_SIG==0)
 pulses++;//moving forward
 if(A_SIG==1)
 pulses--;//moving reverse
 Serial.println(pulses);
 attachInterrupt(1, B_RISE, RISING);
}

I'm attaching the rfid reader code but I am mainly reworking it from Jeremy Blums tutorials on youtube. If anyone could tell me how to go about doing this or if the code I'm trying to combine is incompatible it'll be much appreciated.

read_rfid2.ino (2.38 KB)

if (value5 ){

If value5 what? digitalRead() does not return a boolean.

void A_RISE(){
 detachInterrupt(0);
 A_SIG=1;
 
 if(B_SIG==0)
 pulses++;//moving forward
 if(B_SIG==1)
 pulses--;//moving reverse
 Serial.println(pulses);
 attachInterrupt(0, A_FALL, FALLING);
}

Interrupts are disabled during an ISR. There is NO reason to detach and reattach the interrupts. It looks like you trigger condition for the ISR should be CHANGE, not RISING and FALLING.

You can NOT Serial.print() in an ISR.

if(B_SIG==0)
 pulses++;//moving forward
 if(B_SIG==1)
 pulses--;//moving reverse

If B_SIG is either 0 or 1, an else is far more appropriate.

however I have no idea how to combine both of these scripts together so I can use these 2 separate sensor values in other programs I am using to complete this project.

You have program A that does something. You have program B that does something. You want program C that does some of A and some of B, but you have not told us what that program should actually do. Therefore, we can't help you.

What I'm trying to achieve is to use the RFID reader to choose a piece of audio to affect in another program and then use the encoder to affect the speed of the chosen audio that I'll make into a crankshaft. if (value5 ){
This part is a reset switch I was working with to reset the encoder values back to zero when the audio is changed, ideally this would happen when I switched RFID tags. As for the way the code is structured for the encoder it is part of some code I was using for a hardware debounce before I got the optical encoder today. Sorry I really should have made what I'm trying to do more clear.