NEED HELP WITH HOME SECURITY SYSTEM CODE

IN THIS CODE A KEYPAD FUNCTION IS USED TO UNLOCK A SYSTEM AND IF NOT SUCCESSFUL, A GSM FUNCTION IS CALLED TO SEND A MSG BUT THIS MSG NEVER SENDS.

BUT WHEN I RUN THE GSM CODE SEPARATELY IS WORKS PERFECTLY.

PLEASE IS THERE ANYTHING THAT I AM MISSING?

trial.ino (10.8 KB)

SoftwareSerial mySerial(A8, A9);

On a Mega, with 4 hardware serial ports? Why?

          while (c==true)
          {
               b=false;
               keypad.getKey();
            delay(50);     //don't ned to run this at full speed.  
         }

Since c is set to true, before this snippet, the loop will start. It will never end. What was the purpose of adding an infinite loop?

Why bother calling getKey() when you discard the result?

     if(digitalRead(pirPin) == HIGH)
     {
   }     
       else
          if(digitalRead(pirPin) == LOW){

Are you planning to handle the other possible values that digitalRead() returns?

Why does getFingerprintIDez() always call SoftwareReset()? Why does the password check function call getFingerprintIDez()?

a, b, and c are lousy names for global variable names. They mean nothing.