           bDHTstarted = false;
         }
       }
+          
+      if (HO_UPDATE || HL_UPDATE) {
+        displayHost(HO, HL);
+        HO_UPDATE = HL_UPDATE = false;
+      }
+
+      if (PW_UPDATE) {
+        displaypowerAvg(PW);
+        PW_UPDATE = false;
+      }
+
+      if (NW_UPDATE) {
+        displayNemoWeight(NW);
+        NW_UPDATE = false;
+      }
+
+      if (PIR_UPDATE) {
+        displayPIR();
+        PIR_UPDATE = false;
+      }
+
+      if (T2_UPDATE || OT_UPDATE) {
+        displayTemperature();
+        T2_UPDATE = OT_UPDATE = false;
+      }
 
       if (timeStatus() != timeNotSet) {
-        if (now() != prevDisplay) { //update the display only if time has changed
+        if (now() != prevDisplay) { 
           prevDisplay = now();
           digitalClockDisplay();
+
+          displaysleepmode(sleepmode);
           requestSharp();
-          HO = unihost + rsphost;
-          HL = unitot + rsptot;
-
-          displaysleepmode(sleepmode);
-          displayHost(HO, HL);
-          displaypowerAvg(PW);
-          displayNemoWeight(NW);
-          displayPIR();
-          displayTemperature();
           displaydustDensity();
 
           if (msgcallback) {


PubSubClient client(mqtt_server, 1883, callback, wifiClient);

volatile float H, T1, T2, OT, PW;
volatile int NW, PIR, HO, HL, unihost, rsphost, unitot, rsptot;
volatile bool msgcallback;

int sleepmode = LOW ;
int o_sleepmode = LOW ;


  //T2 =  OT = PW = NW =  dustDensity = 0 ;
  PIR = HO = HL = moisture = unihost = rsphost = unitot = rsptot = 0;
  acquirestatus = 0;
  T2_UPDATE = OT_UPDATE = PW_UPDATE = NW_UPDATE = PIR_UPDATE = HO_UPDATE = HL_UPDATE = false;
  msgcallback = false;


