 // b5 is calculated in bmp085GetTemperature(...), this variable is also used in bmp085GetPressure(...)
 // so ...Temperature(...) must be called before ...Pressure(...).
 long b5; 
-short temperature;
-long pressure;
+float temperature;
+float pressure;
 float atm; // "standard atmosphere"
 float alti; 
 

  }
}

// BMP085
// Stores all of the bmp085's calibration values into global variables
// Calibration values are required to calculate temp and pressure
// This function should be called at the beginning of the program

    alti = calcAltitude(pressure);
    //dtostrf(floatVar, minStringWidthIncDecimalPoint, numVarsAfterDecimal, charBuf);
    Serial.print("Temp: ");
    Serial.print(temperature, 2);
    Serial.println(" C");
    Serial.print("Pres: ");
    Serial.print(pressure, 0);
    Serial.println(" Pa");
    Serial.print("Atmophere: ");
    Serial.println(atm, 4);
    Serial.print("Altitude: ");
    Serial.print(alti, 2);
    Serial.println("M");
    Serial.println();

//    if (dataFile) {
//      dataFile.print(timestamp);
//      dataFile.print(",");
//      dataFile.print(temperature);
//      dataFile.print(",");
//      dataFile.println(pressure);
//    }  
//    // if the file isn't open, pop up an error:
//    else {
//      Serial.println("error opening datalog.txt");
//    }
    to_save ++;
  } 
  
