 #include "SmartThings.h"
 
 #define DEBUG_ENABLED      1
-#define DEBUG_RAW_ENABLED  0
+#define DEBUG_RAW_SHORT    1
+#define DEBUG_RAW_HISTORY  0
 #define SUBMIT_TO_ST       1
 
 #define PIN_THING_RX       3


Queue<40> measurements;
float lastDistance = 0;

int lastLedState = 0;
unsigned long lastCheck = 0;

      }

      Serial.print(diff);

#if DEBUG_RAW_HISTORY      
      Serial.print("  :: Last 10 :: ");
      
      for (int i = max(0, measurements.size() - 10); i < measurements.size(); ++i) 
