![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Test program of BMP085 pressure sensor
Fork of BMP085_lib by
test.cpp@5:34e9a3921278, 2012-11-09 (annotated)
- Committer:
- newk8600
- Date:
- Fri Nov 09 19:29:16 2012 +0000
- Revision:
- 5:34e9a3921278
- Parent:
- main.cpp@2:227f0a670091
- Child:
- 6:869b95a43075
changed name;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
newk8600 | 0:9c929de0a051 | 1 | /* |
newk8600 | 0:9c929de0a051 | 2 | * |
newk8600 | 0:9c929de0a051 | 3 | * |
newk8600 | 0:9c929de0a051 | 4 | * |
newk8600 | 2:227f0a670091 | 5 | * |
newk8600 | 2:227f0a670091 | 6 | * |
newk8600 | 0:9c929de0a051 | 7 | * |
newk8600 | 0:9c929de0a051 | 8 | * |
newk8600 | 0:9c929de0a051 | 9 | * |
newk8600 | 2:227f0a670091 | 10 | * |
newk8600 | 2:227f0a670091 | 11 | * |
newk8600 | 0:9c929de0a051 | 12 | * |
newk8600 | 0:9c929de0a051 | 13 | */ |
newk8600 | 1:2935199329b2 | 14 | |
newk8600 | 1:2935199329b2 | 15 | #include "mbed.h" |
newk8600 | 2:227f0a670091 | 16 | #include "BMP085.h" |
newk8600 | 0:9c929de0a051 | 17 | |
newk8600 | 0:9c929de0a051 | 18 | |
newk8600 | 1:2935199329b2 | 19 | int main() |
newk8600 | 1:2935199329b2 | 20 | { |
newk8600 | 1:2935199329b2 | 21 | |
newk8600 | 1:2935199329b2 | 22 | |
newk8600 | 2:227f0a670091 | 23 | alt_sensor.display_cal_param(&pc); |
newk8600 | 2:227f0a670091 | 24 | |
newk8600 | 2:227f0a670091 | 25 | pc.printf("Temperature: %d\r\n", alt_sensor.get_temperature()); |
newk8600 | 2:227f0a670091 | 26 | pc.printf("Pressure: %d\r\n", alt_sensor.get_pressure()); |
newk8600 | 2:227f0a670091 | 27 | pc.printf("Altitude: %f\r\n", alt_sensor.get_altitude_ft()); |
newk8600 | 1:2935199329b2 | 28 | } |
newk8600 | 2:227f0a670091 | 29 | |
newk8600 | 0:9c929de0a051 | 30 |