   }
   */
 
+  client.loop();
+  
   if (client.connected()) {
     if (DEBUG_PRINT) {
       Serial.print("Sending payload: ");

          lastReconnectAttempt = 0;
        }
      }
    } 
  } else {
    wifi_connect();
  }

  VIrms = emon1.calcIrms(1480) * 220.0;
  ave.push(VIrms);
  average = ave.mean();

  if ( revMills > 600 ) {
    revValue = (float(( 3600  * 1000 ) / ( 600 * float(revMills) ) ) * 1000);
