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.
Fork of Seeed_Barometer_Sensor_Example by
Diff: main.cpp
- Revision:
- 0:8381ff08ace1
- Child:
- 1:e15e9cb70711
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Aug 16 01:03:36 2014 +0000 @@ -0,0 +1,18 @@ + +#include "mbed.h" +#include "BMP085.h" + +BMP085 barometer(D14, D15); + +int main(void) +{ + float p = 0.0f, t = 0.0f; + + while(1) { + barometer.update(); + p = barometer.get_pressure(); + t = barometer.get_temperature(); + printf("Pressure: %6.2f Temperature(c): %6.2f Temperature(F): %6.2f\n", p, t, 32 + t * 1.8f); + wait(1.0f); + } +}