BMP 085

by fmbfla on Mon Nov 12, 2012 8:24 pm

I added the conversion from Celsius to Fahrenheit in the Adafruit BMP085 Library BMP085.cpp

I don't know if it helps anyone but, if you don't do "C's" you can use it Straight up with no extra typing and get the Fahrenheit.
Code: Select all
  // step 1
  X1 = ((UT - (int32_t)ac6) * (int32_t)ac5) >> 15;
  X2 = ((int32_t)mc << 11) / (X1 + (int32_t)md);
  B5 = X1 + X2;
  temp = (B5 + 8) >> 4;
  temp /= 10;
//_________________________________________
// Below is what I added to the "return temp;"
//_________________________________________

  return temp * 9.0 / 5.0 + 32.0;


Hope you can use it :-)
fmbfla
 
Posts: 69
Joined: Fri Jun 08, 2012 5:48 pm