Trouble Reattching Interrupt

Hello all, I will do my best to be as informative as possible with this post.
I am currently using a PIR sensor purchased from adafruit.com, I am told it’s operation is identical to the sensor in http://www.ladyada.net/media/sensors/PIRSensor-V1.2.pdf.

I have written a sketch that uses a single interrupt to check for a rising edge on the input from the sensor. After the interrupt is triggered, I set some boolean variables and then detach the interrupt for the second part of my program. The second part starts a timer when the input from the sensor hits low. If the input stays low for five seconds, the Arduino prints “Motion Ended” and reattaches the interrupt, and waits for motion again. If there is more motion before five seconds is up, the timer function exits and is called again when the input is back to low. That way, there MUST be at least five seconds of no motion before the all clear signal is given.

What I want to happen:
When the all clear is given, reattach the interrupt and wait for more motion.

What really happens:
The reattach works fine when there has been NO break in the motion at all. However, if there is HIGH, then LOW, then the timer is called, then more HIGH, the timer exits, then LOW again, the timer is called again, and all clear is given (that is all working good) the reattach of the interrupt works, but the interrupt is immediately triggered after it has been reattached, even if there is no motion at all anymore. After this immediate trigger, the code executes as if there had been no motion, and all clear is given.

EDIT: I have checked with a multimeter and when the reattached interrupt is immediately triggered the voltage across the pin is 0.0 or LOW. I am totally dumbfounded.

Here is my code. I hope it is well commented, as I sure could use some help. I want to know why the interrupt is being triggered as soon as it is reattached but only if there has been motion after the timer function has been called.

/*-----Silent Alarm Script-------*/
/*--Copyright 2012 JNew---*/
//Monitors PIR sensor for high output, relays data to pc

int pinInter = 0; //using pin 2 or interrupt 0
int actualPin = 2; //the actual pin

boolean isMoving = false; //has there been movement in the last 5 seconds
boolean sendMoving = false; //has there been a message about movement sent

unsigned long startTime; //start time in millis of timer
boolean timerStarted = false; //has the timer been started

void setup()
{
  Serial.begin(9600); //open serial com at 9600bits/sec
  pinMode(actualPin, INPUT);
  //we must first calibrate the sensor for 30 seconds
  Serial.println("Calibrating PIR Sensor: ");
    for(int i = 0; i < 30; i++)
    {
      Serial.print(".");
      delay(1000);
    }
  Serial.println(" done.");
  delay(100);
  attachInterrupt(0, motionDetected, RISING); //sets interrupt to RISING, calls motionDetected when interrupted
}

void loop()
{
  //nothing happens until interrupt
  while(isMoving)
  {
    if(sendMoving) //only send message once
    {
      Serial.println("Motion Detected!"); //prints motion once
      sendMoving = false;
    }
    
    if(digitalRead(actualPin) == LOW && lowTimer() == true)//if no movement and over five seconds on timer
    {
        Serial.println("Motion Stopped.");
        delay(2000);
        attachInterrupt(0, motionDetected, RISING);//reattach interrupt
    }
    else
    {
      delay(1000);
      Serial.println("Motion Continues.");
    }
  }
}

void motionDetected()
{
  Serial.println("ENTER motionDetected");
  isMoving = true;
  sendMoving = true;
  detachInterrupt(0); //detach for movement timing phase
}

boolean lowTimer()
{
  Serial.println("ENTER lowTimer");
  
  while(digitalRead(actualPin) == LOW)
  {
    if(timerStarted == false) //start timer once
    {
        startTime = millis();
        timerStarted = true;
    }
    if(timerStarted == true && (millis()-startTime) > 5000) //if the timer has gone for five seconds
    {
        isMoving = false;
        timerStarted = false;
        Serial.println("EXIT lowTimer");
        return true;
    }
  }
  //if movement occurs during the timing, exit and reset timer
  timerStarted = false;
  Serial.println("EXIT lowTimer");
  return false;
}

http://www.gammon.com.au/interrupts

From that page:

Something to be aware of is that these flags can be set before you attach the interrupt handler. For example, it is possible for a rising or falling level interrupt on pin D2 to be "flagged", and then as soon as you do an attachInterrupt the interrupt immediately fires, even if the event occurred an hour ago. To avoid this you can manually clear the flag. For example:

EIFR = _BV (INTF0);  // clear flag for interrupt 0
EIFR = _BV (INTF1);  // clear flag for interrupt 1

[quote author=Nick Gammon link=topic=101001.msg757471#msg757471 date=1334205612] http://www.gammon.com.au/interrupts

From that page:

Something to be aware of is that these flags can be set before you attach the interrupt handler. For example, it is possible for a rising or falling level interrupt on pin D2 to be "flagged", and then as soon as you do an attachInterrupt the interrupt immediately fires, even if the event occurred an hour ago. To avoid this you can manually clear the flag. For example:

EIFR = _BV (INTF0);  // clear flag for interrupt 0
EIFR = _BV (INTF1);  // clear flag for interrupt 1

[/quote]

That did the trick. Clearing the flags before attaching and reattaching makes the program run exactly as intended. Thank you for sharing your superb resource as well, I'll be sure to come back and read more.