![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Sample program for MS5607 (I2C, SPI) library
Revision 0:c06e6d1972d6, committed 2012-07-03
- Comitter:
- yamaguch
- Date:
- Tue Jul 03 08:58:18 2012 +0000
- Commit message:
- 0.92
Changed in this revision
diff -r 000000000000 -r c06e6d1972d6 MS5607.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MS5607.lib Tue Jul 03 08:58:18 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/yamaguch/code/MS5607/#5760862143d1
diff -r 000000000000 -r c06e6d1972d6 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Jul 03 08:58:18 2012 +0000 @@ -0,0 +1,13 @@ +#include "mbed.h" +//#include "MS5607SPI.h" +#include "MS5607I2C.h" + +int main() { + //MS5607SPI ms5607(p11, p12, p13, p10); + MS5607I2C ms5607(p9, p10, false); + + ms5607.printCoefficients(); + printf("Pressure = %.0f Pa\n", ms5607.getPressure()); + printf("Temperature = %.2f degC\n", ms5607.getTemperature()); + printf("Altitude = %.2f m\n", ms5607.getAltitude()); +} \ No newline at end of file
diff -r 000000000000 -r c06e6d1972d6 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Jul 03 08:58:18 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/737756e0b479