MPL115A2 (I2C) Pressure sensor interface
Dependents: MPL115A2Sample dataloger_for_modelrocket ARLISS2012_Hidaka
Diff: main.cpp
- Revision:
- 1:b1d4ab9b1e84
diff -r 4df6d69700fa -r b1d4ab9b1e84 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Apr 26 11:30:35 2011 +0000 @@ -0,0 +1,12 @@ +#include "mbed.h" +#include "MPL115A2.h" + +int main() { + MPL115A2 mpl115a2(p28, p27); + + while (1) { + printf("temperature = %3.1f degree, pressure = %d hPa\n", + mpl115a2.readTemperature(), mpl115a2.readPressure()); + wait(1); + } +} \ No newline at end of file