This works: (I know it's an UNO and not a DUE. I just thought it might work for the OP)
The push button is connected to pin d7. There is no other circuitry other than described here. No caps.
No resistors. Nothing. (except the push button switch has the standard 10k pullup and the switch has
a 1 k pulldown to ground on the other terminal so a button press connects d7 to GND through the 1 k pulldown.)
d4 is jumpered to d2 (d2 is the interrupt input pin)
A button press less than about one second does not trigger the interrupt.
The push button is a substitute for input from the reed relay. I don't have a reed relay to use to test it.
You can adjust the debounce time if it is too long for you.
#define SWITCH_1 7
#define in_terrupt 2
#define signal 4
#define ledpin 13
#define debounce_time 250
unsigned long start_time;
unsigned long elapsed_time ;
int val;
volatile boolean interrupt_occured = false;
void setup()
{
pinMode(SWITCH_1,INPUT);
pinMode(in_terrupt,INPUT);
pinMode(signal,OUTPUT);
Serial.begin(19200);
attachInterrupt(in_terrupt, switchPressed, FALLING);
}
void loop()
{
val= digitalRead(SWITCH_1);
if (val == LOW)
{
start_time = millis();
do
{
elapsed_time = millis();
val= digitalRead(SWITCH_1);
} while (elapsed_time - start_time < debounce_time ) ;
if (val == LOW)
{
digitalWrite(ledpin, HIGH);
delay(500);
digitalWrite(ledpin, LOW);
delay(500);
digitalWrite(ledpin, HIGH);
delay(500);
digitalWrite(signal, LOW);
delay(500);
Serial.println("Switch press");
Serial.print("start_time: ");
Serial.println(start_time);
Serial.print("elapsed_time: ");
Serial.println(elapsed_time);
unsigned long difference = elapsed_time - start_time;
Serial.print("difference: ");
Serial.println(difference);
Serial.println();
interrupt_occured = true;
}
}
if (interrupt_occured)
{
Serial.println("Switch pressed");
Serial.println();
}
interrupt_occured = false;
}
void switchPressed()
{
interrupt_occured = true;
}