Waking up from Pin 2...

I have a Arduino Uno, with a SparkFun PIR sensor attached on PIN 2.

I set up the PIR so its working correctly and it detects motion on LOW, but when I put the Arduino to Sleep sleep.sleepInterrupt(0,LOW); it never wakes up…

Whats wrong with this picture? The PIR works flawlessly on its own…

I basically want to save as muh power consumption as possible until the PIR says … something moved… wake up and do something!

Thanks in advance!

#include <Sleep_n0m1.h>

Sleep sleep;

// Pin for PIR sensor
int alarmPin = 2;
int alarmValue = 0;

void setup()
{
   
   Serial.begin(9600);
   
   // Set up PIR PIN and give 2 seconds for it to take a room snapshot
   pinMode(alarmPin, INPUT);
   // turn on internal pull-up resistor
   digitalWrite(alarmPin, HIGH);
   delay (2000);  
}

void loop()
{
  
   delay(500);

   alarmValue = digitalRead(alarmPin);

   if (alarmValue == LOW)
   {
      Serial.println("Motion Detected");
   }
  delay(100); ////delays are just for serial print, without serial they can be removed
  Serial.println("execute your code here");

  Serial.print("Sleeping Till Interrupt");
 
  delay(100); //delay to allow serial to fully print before sleep
    
  sleep.pwrDownMode(); //set sleep mode
  sleep.sleepInterrupt(0,LOW); //sleep for: sleepTime
}

DOES the PIR gets a voltage, otherwise it cannot give a signal...

maybe this page has some tips - http://www.gammon.com.au/forum/?id=11497 -

What happens if you change the PIR with a switch for debugging? Does it trigger the interrupt when set to low? Also reading the Sparkfun page did you consider this:

The alarm pin is an open collector meaning you will need a pull up resistor on the alarm pin. The open drain setup allows multiple motion sensors to be connected on a single input pin. If any of the motion sensors go off, the input pin will be pulled low.

sleep.sleepInterrupt(0,LOW); //sleep for: sleepTime

Considering the pin is low(movement detected) does this will wake up the processor or sleep it? I don't know that library What parameters are expected ( what is 0, and what is LOW) where in code you say to expect the interrupt is triggered on pin 2? What I know about interrupts you need to tell were the interrupt pin is attached. Shouldn't be something like

sleep.sleepInterrupt(2,HIGH); //sleep for: sleepTime