Sample program for MS5611 (I2C, SPI) library

Dependencies:   MS5611 mbed

Fork of MS5607Example by Hiroshi Yamaguchi

main.cpp

Committer:
yamaguch
Date:
2012-07-03
Revision:
0:c06e6d1972d6
Child:
1:515d101b8e55

File content as of revision 0:c06e6d1972d6:

#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());
}