CORE
/
Sample_MS5607
Sample for MS5607 (used by LPC1768)
Revision 0:6e902e6168af, committed 2016-10-24
- Comitter:
- mikawataru
- Date:
- Mon Oct 24 17:07:57 2016 +0000
- Commit message:
- Sample for MS5607
Changed in this revision
diff -r 000000000000 -r 6e902e6168af MS5607.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MS5607.lib Mon Oct 24 17:07:57 2016 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/users/mikawataru/code/MS5607/#41a651b76fc4
diff -r 000000000000 -r 6e902e6168af main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Oct 24 17:07:57 2016 +0000 @@ -0,0 +1,19 @@ +#include "mbed.h" +//#include "MS5607SPI.h" +#include "MS5607I2C.h" + +//MS5607SPI ms5607(p11, p12, p13, p3); +MS5607I2C ms5607(p28, p27, false); +Serial pc(USBTX, USBRX); + +int main() { + float Alt; + while(1){ + Alt = ms5607.getAltitude(); + //ms5607.printCoefficients(); + pc.printf("Pressure = %.0f Pa\t", ms5607.getPressure()); + pc.printf("Temperature = %.2f degC\n", ms5607.getTemperature()); + pc.printf("Altitude = %.2f m\n",Alt); + wait(1); + } +}
diff -r 000000000000 -r 6e902e6168af mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Oct 24 17:07:57 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/34e6b704fe68 \ No newline at end of file