     }
   }
 
-  if ((true == messageWaiting) && (false == ledOn)) {
-    digitalWrite(LED_PIN, HIGH);
-    ledOn = true;
-  } else {
-    digitalWrite(LED_PIN, LOW);
-    ledOn = false;
+  count++;
+  if (count >= 50 ) {
+    count = 0;
+    if ((true == messageWaiting) && (false == ledOn)) {
+      digitalWrite(LED_PIN, HIGH);
+      ledOn = true;
+    } else {
+      digitalWrite(LED_PIN, LOW);
+      ledOn = false;
+    }
   }
-                 
-  delay(BLINK_INTERVAL_SECONDS * 1000);
-
+  delay(BLINK_INTERVAL_SECONDS * 1000/50);
 }

boolean ledOn;

void callback(const MQTT::Publish& pub) {
  if(0 == strcmp(pub.payload_string().c_str(), "1")) {
    messageWaiting = true;
  } else {

  client.set_callback(callback);
}

int count = 0;

void loop() {
  client.loop();
