 
 const int chipSelect = 4; //sets chip select pin for SD card reader
 
-MS_5803 sensor = MS_5803(512); // Define pressure sensor.
+/* This integer specifies how high accuracy you want your pressure sensor to be (oversampling resolution).
+ * Ok values: 256, 512, 1024, 2048, or 4096 (Higher = more accuracy but slower sampling frequency**)
+ * ** There is no reason not to use the highest accuracy. This is because the datalogging rate is set by the
+ * sampling/response frequency of the ec sensor [default = 1 sec] (this is to avoid the case where both sensors send data at the same time). */
+#define PRESSURE_SENSOR_RESOLUTION 4096
+MS_5803 sensor = MS_5803(PRESSURE_SENSOR_RESOLUTION); // Define pressure sensor.
 
 OneWire oneWire(6); // Define the OneWire port for temperature.
 DallasTemperature sensors(&oneWire); //Define DallasTemperature input based on OneWire.

SoftwareSerial ecSerial(12, 13); // Define the SoftwareSerial port for conductivity.

double pressure_abs; //define absolute pressure variable

//Declare global temperature variables.
float tempA;
float tempB;
float tempC;

//Declare global variables for eletrical conductivity
float EC_float = 0;

  sensor.initializeMS_5803(); // Initialize pressure sensor

  sensors.begin();  // Intialize the temperature sensors.
  sensors.setResolution(TEMP_SENSOR_RESOLUTION);  // Set the resolution (accuracy) of the temperature sensors.
  sensors.requestTemperatures(); // on the first pass request all temperatures in a blocking way to start the variables with true data.
  tempA = sensors.getTempCByIndex(0);
  tempB = sensors.getTempCByIndex(1);
  tempC = sensors.getTempCByIndex(2);
  sensors.setWaitForConversion(false);  // Now tell the Dallas Temperature library to not block this script while it's waiting for the temperature mesurement to happen

  ecSerial.begin(9600); // Set baud rate for conductivity circuit.

  do {

    ecSerial.write('i');  // Tell electrical conductivity board to reply with the board information by sending the 'i' character ...
    ecSerial.write('\r'); // ... Finish the command with the charage return character.
    received_from_sensor = ecSerial.readBytesUntil('\r', EC_data, 30); // Wait for the ec circut to send the data before moving on...
    EC_data[received_from_sensor] = 0; // Null terminate the data by setting the value after the final character to 0.

  } while (EC_data[1] != 'I'); // Keep looping until the ecSerial has sent the board info string (also indicating it has booted up, I think...)

  Serial.print("EC Board Info (Format: ?I,[board type],[Firmware Version]) -> "); Serial.println(EC_data);
  
  delay(10);
  ecSerial.write('C');  // Tell electrical conductivity board to continously ("C") transmit mesurements ...
  ecSerial.write(',');  //
  ecSerial.print(EC_SAMPLING_FREQUENCY);    // ... every x seconds (here x is the EC_SAMPLING_FREQUENCY variable)
  ecSerial.write('\r'); // Finish the command with the carrage return character. 
  
  received_from_sensor = ecSerial.readBytesUntil('\r', EC_data, 10); // keep reading the reply until the return character is recived (or it gets to be 10 characters long, which shouldn't happen)
  EC_data[received_from_sensor] = 0; // Null terminate the data by setting the value after the final character to 0.
  Serial.print("EC Frequency Set Sucessfully? -> "); Serial.println(EC_data);

}

void loop () {

  //Read electrical conductivity sensor
  if (ecSerial.available() > 0) {
