Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 0:bcb1988de877, committed 2015-11-15
- Comitter:
- asmellby
- Date:
- Sun Nov 15 18:05:54 2015 +0000
- Commit message:
- Barometer example.;
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BMP085.lib Sun Nov 15 18:05:54 2015 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/teams/silabs-abakurs/code/BMP085/#fb197da45ba8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sun Nov 15 18:05:54 2015 +0000
@@ -0,0 +1,22 @@
+#include "BMP085.h"
+
+LowPowerTicker ticker;
+
+bool do_measurement = false;
+void measurement() {
+ do_measurement = true;
+}
+
+int main() {
+ BMP085 sensor(PD6, PD7, BMP085_MODE_HIGH_RESOLUTION);
+ ticker.attach(&measurement, 0.4);
+
+ while(1) {
+ sleep();
+ if(do_measurement) {
+ do_measurement = false;
+ sensor.measure();
+ printf("T: %6.2f, P: %6.4f\r\n ", sensor.get_temperature(), sensor.get_pressure());
+ }
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sun Nov 15 18:05:54 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/9296ab0bfc11 \ No newline at end of file