GPS PM2.5

#include <ELECHOUSE_CC1101.h>
 #include "Barometer.h"
#include <Wire.h>
#include <TinyGPS++.h>
#include <SoftwareSerial.h>
SoftwareSerial mySerial(0, 1); // MEAG TX:10, RX:11
long m;
long n;
long p[13];
    int pm1;
    int pm2d5;
    int pm10;
    long lng ,lat;

#define size 11
TinyGPSPlus gps;
SoftwareSerial ss(A3, A4);

byte TX_buffer[size]={0};
float temperature;
float pressure;
float altitude;
Barometer myBarometer;

void setup()
{
  Serial.begin(9600);

  ELECHOUSE_cc1101.Init();
  myBarometer.init();
      mySerial.begin(9600);
   ss.begin(9600);
}

void loop()
{

 if (ss.available() > 0){
    if (gps.encode(ss. read())){
      GPS();
    }}

  PM5();

    TX_buffer[3]=m%100;
     TX_buffer[2]=(m/100)%100;
     TX_buffer[1]=(m/10000)%100;
     TX_buffer[0]=(m/1000000)%1000;
     TX_buffer[7]=n%100;
     TX_buffer[6]=(n/100)%100;
     TX_buffer[5]=(n/10000)%100;
     TX_buffer[4]=(n/1000000)%1000;
        
      
     temperature = myBarometer.bmp085GetTemperature(myBarometer.bmp085ReadUT());
   pressure = myBarometer.bmp085GetPressure(myBarometer.bmp085ReadUP());//Get the temperature
   altitude = myBarometer.calcAltitude(pressure); 
     
     TX_buffer[8]=altitude;
      TX_buffer[9]=pm2d5;
     Serial.print(m);
     Serial.print(",");
     Serial.print(n);
     Serial.print(",");
   Serial.print(TX_buffer[0]);
   Serial.print(",");
   Serial.print(TX_buffer[1]);
     Serial.print(",");
  Serial.print(TX_buffer[2]);
     Serial.print(",");
  Serial.print(TX_buffer[3]);
     Serial.print(",");
  Serial.print(TX_buffer[4]);
     Serial.print(",");
  Serial.print(TX_buffer[5]);
     Serial.print(",");
  Serial.print(TX_buffer[6]);
     Serial.print(",");
  Serial.print(TX_buffer[7]);
     Serial.print(",");
  Serial.print(TX_buffer[8]);
     Serial.print(",");
  Serial.print(TX_buffer[9]);
     Serial.print(",");
     Serial.print(",");
 Serial.println("");
  
  Serial.print(gps.location.lat(), 6);
     Serial.print(",");
  Serial.print(gps.location.lng(), 6);
 Serial.println("");
 Serial.println("");
 delay(100);
   
   
   ELECHOUSE_cc1101.SendData(TX_buffer,size);
  delay(1);
         

}
void PM5()
{
 
  byte b3[32] = {0};
  int i = 0;
  int j = 0;
  int k = 0;

  while(mySerial.available() > 0) {
    b3[i] =mySerial.read();
    i++;
    if (i > 1 && (b3[0] != 0x42 || b3[1] != 0x4d))
      i = 0;
      if(i>=32)break;
    }
    for (j = 0; j < 13; j++) {
    p[j] = b3[2 * j + 4] * 0x100 + b3[2 * j + 5];
  }
    for (j = 0; j < 30; j++) {
    k += b3[j];
  }
  j = b3[30] * 0x100 + b3[31];
  if (j > 0 && j == k) {   
    pm1 = p[3];
    pm2d5 = p[4];
    pm10 = p[5];
delay(1000);
   } 
}     
void GPS()
{

  if (gps.location.isValid()){
  m=gps.location.lat()*1000000;
  n=gps.location.lng()*1000000;
   
  }
}

this code has a big problem ,Value can not be taken by GPS i dont no why , and GPS PM2.5 Can not coexist。i use UNO and G3 PM2.5 Ublox NEO-6M V2 GPS
sorry my ENGLISH not very well。

SoftwareSerial mySerial(0, 1); // MEAG TX:10, RX:11

is a bad idea. why would you use software Serial on the real hardware serial?

Will, it can work if i just write PM2.5 CODE ,BUT when i add in GPS CODE and didnt put anything on the port (0,1),it will stop at first value ,so i think it not port problem ,i will change the port but i think it will same not work。

  Serial.begin(9600); uses pin 0 and 1 and

SoftwareSerial mySerial(0, 1); // MEAG TX:10, RX:11
...
mySerial.begin(9600);

uses pins 0 and 1 too...

you don't need mySerial if you use the Hardware serial port. just use Serial.

  while(mySerial.available() > 0) {
    b3[i] =mySerial.read();

becomes

  while(Serial.available() > 0) {
    b3[i] =Serial.read();

Also all your "big" numbers that don't fit in a standard int (like 1000000) should be labeled as long 1000000L or unsigned long 1000000UL

  while(Serial.available() > 0) {
    b3[i] =Serial.read();

i change to this it just cant read for one time and next all the same value

i use long when i need it, no int in had to *1000000 so didnt overstep

s961725:

  while(Serial.available() > 0) {

b3[i] =Serial.read();



i change to this it just cant read for one time and next all the same value

i use long when i need it, no int in had to *1000000 so didnt overstep

have you removed all the references to mySerial including its declaration and the begin?

I understand you used long when needed, but as a principle it's better to flag large ints in the right way.