     switch (chk)
     {
       case DHTLIB_OK:
+        // inc count and sum values
+        dht_data_read_count++;
+        DHT_temp_mid += DHT.temperature;
+        humid_mid += DHT.humidity;
         break;
       case DHTLIB_ERROR_CHECKSUM: 
         Serial.println("Checksum_error"); 

    Serial.println((int) DHT.humidity); */
    
    // send
    Serial.print((float) ds18_temp_mid/data_read_count, 2);
    Serial.print(',');
    Serial.print((float) DHT_temp_mid/data_read_count, 2);
    Serial.print(',');
    Serial.println((float) humid_mid/data_read_count, 2);
    
    // zero values and counter
    ds18_temp_mid = 0; DHT_temp_mid = 0; humid_mid = 0;
    data_read_count = 0;
  }
  
  // SHOW DATA

    }
    // TURN OFF LED
    digitalWrite(LED, LOW);
  }
  
  // SEND DATA
