How to but different datas of different sensores in a array?

Hello.
I have to arduino uno(A and B) connect in TX-RX pins. In the arduino A, I put the module RFID-RC522 to read the cards.
And in the arduibo B, I put the GY-GPS6MU2.
The problems is:
When I passed the card, the ID mix with the data from GPS.

How I can fix this?
Make a array is the big ideia or have other ways?

You have to fix the code so that it doesn't try to send both at the same time.

I have code that can send multiple pieces of data without them getting messed up. It works just fine.

Delta_G:
You have to fix the code so that it doesn't try to send both at the same time.

I have code that can send multiple pieces of data without them getting messed up. It works just fine.

It's possible to you show that code? Or the way you make that?

Well I figured that if you were sure I could tell what was wrong with your code without being able to see it then surely you would be able to tell what was different in my code the same way.

Why don't you post your code and we can help you figure out what you did wrong.

Please read the How To Use This Forum post at the top of any of the boards and learn the forum rules on posting code. Please include the details of your project. Remember, we can't see it from here.

Code of sleve arduino(A)

#include <MFRC522.h>
#include <SPI.h>
#include <Wire.h>

#define SAD 10
#define RST 5

int led_liberado = 2;

MFRC522 nfc(SAD, RST);

void setup() {
  SPI.begin();
  byte status;
  byte data[MAX_LEN];
  byte serial[5];
  int i, j, pos;
  // Read a fast as possible. There is a limit for how long we are
  // allowed to read from the tags.
  Wire.begin(8);                // join i2c bus with address #8
  Wire.onRequest(requestEvent); // register event
  Serial.begin(115200);

  Serial.println("Looking for MFRC522.");
  nfc.begin();

  // Get the firmware version of the RFID chip
  byte version = nfc.getFirmwareVersion();
  if (! version) {
    Serial.print("Didn't find MFRC522 board.");
    while(1); //halt
  }

  Serial.print("Found chip MFRC522 ");
  Serial.print("Firmware ver. 0x");
  Serial.print(version, HEX);
  Serial.println(".");
}

byte keyA[6] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, };
byte keyB[6] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, };

void loop() {
  byte status;
  byte data[MAX_LEN];
  byte serial[5];
  int i, j, pos;

  // Send a general request out into the aether. If there is a tag in
  // the area it will respond and the status will be MI_OK.
  status = nfc.requestTag(MF1_REQIDL, data);

  if (status == MI_OK) {
       // calculate the anti-collision value for the currently detected
    // tag and write the serial into the data array.
    status = nfc.antiCollision(data);
    memcpy(serial, data, 5);
  while(j<=1)
 { 
    for (i = 0; i < 3; i++) {
      Serial.print(serial[i], HEX);
      Serial.print(", ");
      j++;
      
    }
    Serial.println(serial[3], HEX);
    digitalWrite(led_liberado, HIGH);
       
 }
  }
  if(status !=MI_OK)
  {
    digitalWrite(led_liberado, LOW);
  }
}
void requestEvent() {
  byte status;
  byte data[MAX_LEN];
  byte serial[5];
  int i, j, pos;
  char ID;
   


  // Send a general request out into the aether. If there is a tag in
  // the area it will respond and the status will be MI_OK.
  status = nfc.requestTag(MF1_REQIDL, data);


  if (status == MI_OK) {
       // calculate the anti-collision value for the currently detected
    // tag and write the serial into the data array.
    status = nfc.antiCollision(data);
    
  while(j<=1)
 { 
    for (i = 0; i < 3; i++) {
      Serial.print(serial[i], HEX);
      Serial.print(", ");
      
      
    }
    Serial.println(serial[3], HEX);
    ID = (serial[3],HEX);
    digitalWrite(led_liberado, HIGH);
    
       
 }
  }
  if(status !=MI_OK)
  {
    digitalWrite(led_liberado, LOW);
  }
}

Code of receive arduino

#include <SoftwareSerial.h>//incluimos SoftwareSerial
#include <TinyGPS.h>//incluimos TinyGPS

char ID;
char ComID;
int cout = 0;
char lonlat;
char hora;

string dados[4];

TinyGPS gps;//Declaramos el objeto gps
SoftwareSerial serialgps(4, 3); //Declaramos el pin 4 Tx y 3 Rx
//Declaramos la variables para la obtención de datos
int year;
byte month, day, hour, minute, second, hundredths;
unsigned long chars;
unsigned short sentences, failed_checksum;

void setup() {
  // Habilita comunicação serial
  Serial.begin(115200);

  // declara pin 11 como output, este é o LED
  Serial.begin(115200);//Iniciamos el puerto serie
  serialgps.begin(9600);//Iniciamos el puerto serie del gps
  //Imprimimos:
  Serial.println("");
  Serial.println("GPS GY-GPS6MV2 Leantec");
  Serial.println(" ---Buscando senal--- ");
  Serial.println("");

}

void gps_leitor()
{
  if (serialgps.available())
  {
   int c=serialgps.read();
    if (gps.encode(c))
    {
      float latitude, longitude;
      gps.f_get_position(&latitude, &longitude);
      Serial.print("Latitud/Longitud: ");
      Serial.print(latitude, 5);
      Serial.print(", ");
      Serial.println(longitude, 5);
      gps.crack_datetime(&year, &month, &day, &hour, &minute, &second, &hundredths);
      Serial.print("Fecha: "); Serial.print(day, DEC); Serial.print("/");
      Serial.print(month, DEC); Serial.print("/"); Serial.print(year);
      Serial.print(" Hora: "); Serial.print((hour, DEC) + 3); Serial.print(":");
      Serial.print(minute, DEC); Serial.print(":"); Serial.print(second, DEC);
      Serial.print("."); Serial.println(hundredths, DEC);
      Serial.print("Altitud (metros): "); Serial.println(gps.f_altitude());
      Serial.print("Rumbo (grados): "); Serial.println(gps.f_course());
      Serial.print("Velocidad(kmph): "); Serial.println(gps.f_speed_kmph());
      Serial.print("Satelites: "); Serial.println(gps.satellites());
      Serial.println();
      gps.stats(&chars, &sentences, &failed_checksum);
    }
    
  }
  
}
void rfid_leitor()
{
  int i;  
  // Se há bytes livres vindo da porta serial
  if (Serial.available())
  {

    ID = Serial.read();
    Serial.print(ID);
    ComID = ID;      
  }

}


void loop() 
{
  rfid_leitor();
  
  gps_leitor();
}

You can copy and paste from the serial monitor which is easier to read. Can you point out the issue there? I don't see what is mixed up?

I put the image with the part when happened the bug

What is it supposed to look like?

Did you not understand me when I asked you to post the actual text instead of a screenshot?