send more than one integer on serial between Mega and nodeMcu i have 2 integers i want to send them from Mega to nodeMcu
i get them to talk to each other 
by this one on Mega :-

#include &lt;DHT.h&gt;      

#define DHTPIN 2      // Selecting the pin at which we have connected DHT11
#define DHTTYPE DHT11 // Selecting the type of DHT sensors

DHT dht ( DHTPIN, DHTTYPE ) ;

        void setup() {
      // initialize both serial ports:
      Serial.begin(9600);
      Serial1.begin(9600);
      dht.begin ();

    }

    void loop() {
      //==========// DHT part
   humidity = dht.readHumidity ( ) ;  // Declaring h a variable and storing the humidity in it.
   temp = dht.readTemperature ( ) ; // Declaring t a variable and storing the temperature in it.
  // Checking if the output is correct. If these are NaN, then there is something in it.
   if ( isnan ( humidity ) || isnan ( temp ) ) {
     Serial.println ( " Sensor not working " ) ;
   }
   else
    Serial.println(humidity);

//========// Send to wifi
 if (Serial1.available()) {

    itoa(humidity,str1,10);
    Serial1.write(str1,2);
    itoa(temp,str2,10);
    Serial1.write(str1,2);
    }


and this on on nodeMcu :-

#include &lt;SoftwareSerial.h&gt;

SoftwareSerial swSer(14, 12, false, 256);
char str1[10],str2[10];
int i,j;

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

  Serial.println("\nSoftware serial test started");

}

void loop() {
  while (swSer.available() &gt; 0) {

    Serial.println("Humidity is");
    for (i=0; i&lt;3; i++){
    str1[i]=(swSer.read());
    }
    Serial.println (str1);
    Serial.println("Temp is");
    for (j=0; j&lt;3; j++){
    str2[j]=(swSer.read());
    }
    Serial.println (str2);


  }


}


But i  get the  result on nodeMcu not in right order (sometimes humidity printed in place of temperature and verse vise and sometimes i get no.2

can some one help me please to figure what is wrong ?
I'd suggest some kind of character before each int so that the receiver knows which one it is getting.