CORE
/
Sample_MS5607
Sample for MS5607 (used by LPC1768)
main.cpp
- Committer:
- mikawataru
- Date:
- 2016-10-24
- Revision:
- 0:6e902e6168af
File content as of revision 0:6e902e6168af:
#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); } }