 unsigned long end_time;
 unsigned long toggle_time;
 unsigned long signal_time;
+unsigned long pendingThreshold = 10000;
 
 #define statusOff 0
 #define statusPending 1

void loop()
{
  //led control
  if(statePending) {
    end_time = millis();


          //set led blink fast
          statePending = true;
          ledStateInterval = 100;
          start_time = millis();

        } else if(strcmp(p.data, "020") == 0) {
          //set led blink slow
          statePending = true;
          ledStateInterval = 600;
          start_time = millis();

        }
      }
