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

Dependencies:   BMP085 mbed nRF51822_blinky

Fork of nRF51822_blinky by RedBearLab

Files at this revision

API Documentation at this revision

Comitter:
yanndouze
Date:
Fri Oct 16 13:06:54 2015 +0000
Parent:
8:d355609af408
Commit message:
Test code for th BMP085 sensor (pressure and temperature) with nRF51822 platform.

Changed in this revision

BMP085.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
nRF51822_blinky.lib Show annotated file Show diff for this revision Revisions of this file
diff -r d355609af408 -r f7fb475f515a BMP085.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BMP085.lib	Fri Oct 16 13:06:54 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/okini3939/code/BMP085/#5e2b1f3c0a6a
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);
     }
diff -r d355609af408 -r f7fb475f515a nRF51822_blinky.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nRF51822_blinky.lib	Fri Oct 16 13:06:54 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/teams/RedBearLab/code/nRF51822_blinky/#d355609af408