 public:
   int _size;
   int _v[T];
-  int _sorted[T];
+  int _average;
 
 public:
   Queue() 
   {
     _size = 0;
+    _average = 0;
     
     memset(&_v, 0, sizeof(_v));
   }
 
-  int size() 
+  inline int size() 
   {
     return _size;  
   }
 
-  void invalidate()
+  inline void invalidate()
   {
     _size = 0;
   }
 
-  bool valid() 
+  inline bool valid() 
   {
     return size() == T;
   }

void loop() {
  unsigned long time = millis();

  if (time - lastCheck > 100) {
    lastLedState = !lastLedState;    
    digitalWrite(PIN_WORKING_LED, lastLedState ? HIGH : LOW);


          }
        }

#if SUBMIT_TO_ST
#if DEBUG_ENABLED
        Serial.print("Update ST...");
#endif
        
        snprintf(message, sizeof(message), "level:%d", (int)cm);
        smartthing.send(message);
#endif        
      }        
    }
    
