How to send numbers from one Arduino to another using Serial

void loop ()
  {
        if (Serial2.available ())
        {
          processInput ();
        } 
                       
       Serial.println(_rpm);
  }

As PaulS said, you are printing _rpm before it arrives. That's why I made a function processNumber. You are supposed to print it from there, when it has totally arrived. Why are you changing a method that works, to one that doesn't?