Interrupt and softwareserial for sim808

Hi serve professionals dear
First of all Apologize i cant write english very well
I intend to make a gps tracker whit sim808 and Arduino for my grandmother car.
My code is very long
I intend to send sms to sim808 or call whit sim808 that sim808 resend to me location and speed of car.
because my code void loop code is very long and have many delay i use from RI pin of sim 808.

RI: this pin will tell you whether the module is on and is there any calls and messages received. It will be pulled to high level when the module is on. And it will change to low for 120ms when a call or message is received.

i use RI Behavior for interrupt that detect a new message or call is has arrived
attachInterrupt(digitalPinToInterrupt(interruptPin), check_sms_call, LOW)

but when interrupt go to check_sms_call Function i do not see any thing in Serial Monitor :frowning:

please help me

First, if you want help you need to post your program. Otherwise we are just guessing.

Second, the code in loop() should not be long and if you want a responsive program there should be no delay()s in it. Have a look at how millis() is used to manage timing without blocking in Several things at a time

Third, if you don't have delay()s you will almost certainly not need an interrupt.

...R

this is example of my code:

#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX

//const byte interruptPin = 2;
char incoming_char=0;



void setup()
{

  //pinMode(interruptPin, INPUT);
  attachInterrupt(2, check, LOW);

  
  // Open serial communications and wait for port to open:
  Serial.begin(9600); // for serial monitor
  mySerial.begin(9600); // for GSM shield
  delay(10000);
  mySerial.print("AT+CMGF=1\r");  // set SMS mode to text
  delay(1000);
  mySerial.print("AT+CNMI=2,2,0,0,0\r"); 
  // blurt out contents of new SMS upon receipt to the GSM shield's serial out
  delay(100);

    // set the data rate for the SoftwareSerial port
  
  
}

void loop() // run over and over
{
  
}

void check()
{
  //Serial.println("test");
  if(mySerial.available() >0)
  {
    incoming_char=mySerial.read(); //Get the character from the cellular serial port.
    Serial.print(incoming_char); //Print the incoming character to the terminal.
  }
}

Unless the purpose of this is to learn how to use interrupts, why not ditch the line attachInterrupt(2, check, LOW); and just add the line

check();

into loop().

In any case you must not put calls to Serial in an Interrupt Service Routine (ISR) because it needs interrupts working and they are turned off in an ISR. Also Serial is slow and an ISR needs to finish as quickly as possible.

If you want to explore interrupts then just put something like this in the ISR

void check() {
  newCharacter == true;
}

and in your code in loop() you cancheck that variable to know when a character has arrived

...R