Pressure Sensor

Dependencies:   mbed-src

Fork of bmp085_lib by Suga koubou

Revision:
2:4fe211aae36e
Parent:
0:dbba605ca87c
--- a/main.cpp	Thu Oct 14 11:27:32 2010 +0000
+++ b/main.cpp	Tue Aug 11 14:01:49 2015 +0000
@@ -1,7 +1,7 @@
 #include "mbed.h"
 #include "BMP085.h"
 
-BMP085 bmp085(p9, p10);
+BMP085 bmp085(p28, p27,BMP085_oss8);
 
 DigitalOut myled(LED1);
 Serial pc(USBTX, USBRX);
@@ -11,7 +11,8 @@
         myled = 1;
 
         bmp085.update();
-        pc.printf("p:%6.2f hPa / t:%6.2f C\n", bmp085.get_pressure(), bmp085.get_temperature());
+        float altitude=bmp085.calcAltitude(bmp085.get_pressure()*100);
+        pc.printf("p:%f hPa / t:%f / altitude=%f \n\r",bmp085.get_pressure() , bmp085.get_temperature(),altitude);
 
         myled = 0;
         wait(3);