 SoftwareSerial nss(2,3); // Pin 2 = Arduino receiver pin (Rx), connect to sensor transmitter pin (Tx). Pin 3 = Arduino Tx, connect it to sensor Rx.
 COZIR czr(nss);
 
+// We poll more often than we log, so we can register some extremes occurring during the logging intervals without having to log huge amounts of data.
+const byte MEASUREMENTS_PER_LOG = 10;
 // Set measure and log intervals
-const byte MEASUREMENTS_PER_LOG = 30; // We poll more often than we record, so we can register the extremes without having to log huge amounts of data.
-byte pollingInterval = 1; // In seconds.  It takes about 30s for big changes even to be picked up by the sensor, so this number can stay high.
+const byte pollingInterval = 600; // In seconds. This number can stay high. It takes about 30s for big changes even to be picked up as a small difference by the sensor.
 byte pollingLoopCounter = 0;
-byte logInterval = MEASUREMENTS_PER_LOG*pollingInterval; // In seconds. This defines how often logs are saved.
+const byte logInterval = MEASUREMENTS_PER_LOG*pollingInterval; // In seconds. This defines how much time is between each log. It's not accurate.
 byte logLoopCounter = 0;
 
 // Special declaration for variables that are averaged with the Average library.

    }
  }
  else {
    digitalWrite(LED, HIGH); // Turn on LED when clock needs to be se
    if (Serial.available()) {
      processDateInput();   
    }

    Serial.println("- " + userInputMsg + "\r\n");
  }
  if( userInputMsg == "csv" ){ // User requests CSV
    if ( sLog.length() > 0){
      Serial.println("Time,Temperature (low),Temperature,Temperature (high),Humidity (low),Humidity,Humidity (high),Carbon Dioxide (low),Carbon Dioxide,Carbon Dioxide (high)");
      Serial.println(sLog);
    }
    else{
      Serial.println("Try again in a bit.");
    }
  }  
}
// Polling - requesting measurements from the sensor
void pollData(){
  // Measurements are pushed in arrays for each measurement type:
  temperatures.push(czr.Celsius());
  humidity.push(czr.Humidity());
  CO2.push(czr.CO2());
