 
 struct AVERAGE {
     float  temperature;
+    int    temperatureCount;
     float  humidity;
+    int    humidityCount;
     float  pressure;
+    int    pressureCount;
     float  gas;
+    int    gasCount;
 } average;
-
-int averageCount;
 
 // Utilities
 void resetLCD();

                        if (String(value) != "nan")
                            data.pressure     = value;
                            average.pressure += value; 
                    }
                }
            }
        }

        value = 0;
        if (settings.gasSensor)
            value = ((1023 - (float) analogRead(PIN_MQ)) / 1023) * 100;
        data.gas     = value;
        average.gas += value; 
    }
}


void processSensors() {
    if (intervals.measure) {
        intervals.measure = false;
        
        float value;
        value = dht.readTemperature();
        if (String(value) != "nan") {
            data.temperature     = value; 
            average.temperature += value;  
            average.temperatureCount++;         
        }
        else {
            Serial.println("Error reading Temperature.");
        }
            
        value = dht.readHumidity();
        if (String(value) != "nan") {
            data.humidity     = value;
            average.humidity += value;  
            average.humidityCount++;                
        }
        else {
            Serial.println("Error reading Humidity.");
        }

        char stat;
