 const byte PIN_TRIG_RIGHT = 5;  // Send the ping on the right sensor.
 const byte PIN_ECHO_RIGHT = 6;  // Listen for the right ping's echo.
 
-byte pingPowerState = 1;        // 0 = sensor off, 1 = sensor on.
+// Debug leds
+const byte PIN_DEBUG_MOTION = 13; // The PIR detected motion.
+const byte PIN_DEBUG_RF_TX = 11; 
  
 unsigned long msgId = 0;        // Each transmission has an id so the receiver knows if it missed something.
 unsigned long lastTransmit = 0; // The last time a transmission was sent.
+
+long powerTimeout = 60000;      // Time to wait in milliseconds to power down if no detection.
  
 unsigned long pingTimer[SONAR_NUM]; // Holds the times when the next ping should happen for each sensor.
 unsigned int cm[SONAR_NUM];         // Where the ping distances are stored.

  NewPing(PIN_TRIG_RIGHT, PIN_ECHO_RIGHT, MAX_DISTANCE),
};


/**
 * Transmit the message.

 then turn on the two ping sensors which detect if someone goes past and in which direction.

*/

// http://www.nongnu.org/avr-libc/user-manual/group__avr__power.html
#include <avr/power.h>
#include <avr/sleep.h>

// NewPing uses timer 2 and switches pinging between sensors
// @see https://code.google.com/p/arduino-new-ping/
