Test code for the BMP085 sensor (pression and temperature) with the nRF51822 platform.

Dependencies:   BMP085 mbed nRF51822_blinky

Fork of nRF51822_blinky by RedBearLab

Revision:
9:f7fb475f515a
Parent:
7:053e387ebb6f
diff -r d355609af408 -r f7fb475f515a main.cpp
--- a/main.cpp	Mon Jul 27 07:03:53 2015 +0000
+++ b/main.cpp	Fri Oct 16 13:06:54 2015 +0000
@@ -1,11 +1,18 @@
 #include "mbed.h"
+#include "BMP085.h"
 
 DigitalOut myled(LED1);
+BMP085 bmp085(D14,D15);
+Serial pc(USBTX, USBRX);
 
 int main() {
     while(1) {
         myled = 1;
         wait(1);
+        
+        bmp085.update();
+        pc.printf("Result --> p:%6.2f hPa / t:%6.2f C \r\n", bmp085.get_pressure(), bmp085.get_temperature());
+ 
         myled = 0;
         wait(1);
     }