Sleeping and Interrupting using pins other than 2, or 3.

Hello, I am trying to save energy by putting my Uno to sleep then waking it up using a switch etc. to pull a pin low from high. The problem is, however, that I have to use pins 2 and 3 for an encoder, and pins 0 and 1 for an xbee. Therefore, I need to use pins 4-12 for the attach interrupt. According to this tutorial

Using interrupts

I can only use pins 2 or 3. Is there any way around this? Here is the basic program I am using to try and change the interrupt to pin 12. (No xbee attached at the moment etc. )

// **** INCLUDES *****
//#include "LowPower.h"
#include <LowPower.h>

// Use pin 2 as wake up pin
const int wakeUpPin = 12;
int led = 13;

void setup()
  // Configure wake up pin as input.
  // This will consumes few uA of current.
  pinMode(wakeUpPin, INPUT_PULLUP);
  pinMode(led, OUTPUT);

void loop()
  // Allow wake up pin to trigger interrupt on low.
  attachInterrupt(digitalPinToInterrupt(wakeUpPin), wakeUp, LOW);

  // Enter power down state with ADC and BOD module disabled.
  // Wake up when wake up pin is low.
  LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF);

  // Disable external pin interrupt on wake up pin.

  // Do something here
  // Example: Read sensor, data logging, data transmission.
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second

void wakeUp()
  // Just a handler for the pin interrupt.

Thank you.

So my solution is to just put it in sleep mode for a second, then come back and check pin 12, then if it is still pulled up high, go back to sleep for another second. If I pull pin 12 low, then it comes out of sleep mode.

Time to learn about pin change interrupts. The datasheet for the 328P refers to them as 'external' interrupts. A YT video about Arduino interrupts.

Correctly configured, you can put the Arduino to sleep and wake it with a pin change interrupt.

The Datasheet for the ATmega328P has conflicting information and ATMEL, prior to Microchip, confirmed that the note #3 on the Wake-Up table is wrong. Basically, External interrupts will wake and trigger an interrupt where a pin change can wake, but won't trigger an interrupt.