     vw_setup(2000);      // Bits per sec
     
     // Been having issues with two interupt pins seemingly setting each other off.
-    // so both call the same isr and only one motion is used.
-    attachInterrupt(0, isrMotion, RISING);
-    attachInterrupt(1, isrMotion, RISING);
+    attachInterrupt(0, isrMotionUp, RISING);
+    attachInterrupt(1, isrMotionDown, RISING);
 
 }
 
 void loop() 
 {
   if (!bitRead(flags, F_DOWN) && !bitRead(flags, F_UP)) {
-    digitalWrite(DEBUG_LED_MOTION, LOW);
+    //digitalWrite(DEBUG_LED_MOTION, LOW);
     sleepNow();
   } else {
-    digitalWrite(DEBUG_LED_MOTION, HIGH);
+    //digitalWrite(DEBUG_LED_MOTION, HIGH);
+  }
+
+  
+  if (motionDown) {
+      // Has the other pir recently detected motion
+      if (bitRead(flags, F_UP)) {
+        // Report that someone just went down stairs.
+        transmitId++;
+        char buf[50];
+        sprintf(buf, "id=%lu,mv=%u,d=DOWN", transmitId, readVcc());
+        transmit(buf);
+        bitClear(flags, F_UP);
+        bitClear(flags, F_DOWN);
+      } else {
+        // Remember that it happened
+        bitSet(flags, F_DOWN);
+      }
+    motionDown = 0;
+  } else if (motionUp) {
+    // Has the other pir recently detected motion
+      if (bitRead(flags, F_DOWN)) {
+        // Report that someone just went up stairs.
+        transmitId++;
+        char buf[50];
+        sprintf(buf, "id=%lu,mv=%u,d=UP", transmitId, readVcc());
+        transmit(buf);
+        bitClear(flags, F_DOWN);
+        bitClear(flags, F_UP);
+      } else {
+        // Remember that it happened
+        bitSet(flags, F_UP);
+      }
+    motionUp = 0;
   }
   
   // Wait a while waiting for the next pir to detect 

// Store the pir states on interupt.
volatile byte flags = 0;
volatile byte motion = 0;

/**
 * @see http://forum.arduino.cc/index.php/topic,85627.0.html

  motion = 1;
}

void isrMotionUp() {
  motionUp = 1;
}

void isrMotionDown() {
  motionDown = 1;
}

void setup()
{
  /*
    for (byte i=0; i<20; i++) {
        pinMode(i, INPUT);        //make all pins input pins
        digitalWrite(i, HIGH);    //with pullup resistors to minimize power consumption
    }
    */
   
    pinMode(DEBUG_LED_TX, OUTPUT);
    pinMode(DEBUG_LED_MOTION, OUTPUT);
