I2CBMPREdBear

Dependencies:   BMP085 mbed

Files at this revision

API Documentation at this revision

Comitter:
Remitte
Date:
Thu Sep 24 15:04:36 2015 +0000
Commit message:
I2C BMP 085 Red Bear

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
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 678a145039d1 BMP085.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BMP085.lib	Thu Sep 24 15:04:36 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/okini3939/code/BMP085/#5e2b1f3c0a6a
diff -r 000000000000 -r 678a145039d1 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Sep 24 15:04:36 2015 +0000
@@ -0,0 +1,23 @@
+#include "mbed.h"
+#include "BMP085.h"
+ 
+BMP085 bmp085(P0_29, P0_28);
+ 
+DigitalOut myled(LED1);
+Serial pc(USBTX, USBRX);
+ 
+int main() {
+    float p, t;
+ 
+    while(1) {
+        myled = 1;
+ 
+        bmp085.update();
+        p = bmp085.get_pressure();
+        t = bmp085.get_temperature();
+        pc.printf("p:%6.2f hPa / t:%6.2f C\n", p, t);
+ 
+        myled = 0;
+        wait(3);
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 678a145039d1 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Sep 24 15:04:36 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/4f6c30876dfa
\ No newline at end of file