Demo program for the MPL3115A2 library.

Dependencies:   FOCOMETROPRESION mbed

Fork of WIGO_MPL3115A2 by clemente di caprio

Revision:
4:bcf56c80dd2b
Parent:
3:e2a621ea6976
Child:
6:07f92b4716b6
--- a/main.cpp	Thu Aug 22 12:03:47 2013 +0000
+++ b/main.cpp	Thu Aug 22 14:53:21 2013 +0000
@@ -51,8 +51,7 @@
 
     while(1) {
         //
-        if ( wigo_sensor1.isDataAvailable()) {
-            wigo_sensor1.getAllData( &sensor_data[0]);
+        if ( wigo_sensor1.getAllData( &sensor_data[0])) {
             if ( mode & 0x0001) {
                 pc.printf("\tPressure: %f\tTemperature: %f\r\n", sensor_data[0], sensor_data[1]);
                 wigo_sensor1.Altimeter_Mode();
@@ -80,8 +79,7 @@
 
     while(1) {
         //
-        if ( wigo_sensor1.isDataAvailable()) {
-            wigo_sensor1.getAllDataRaw( &raw_data[0]);
+        if ( wigo_sensor1.getAllDataRaw( &raw_data[0])) {
             if ( mode & 0x0001) {
                 pc.printf("\tPressure: %f\tTemperature: %f\r\n", print_PressureValue( &raw_data[0]), print_TemperatureValue( &raw_data[3]));
                 wigo_sensor1.Altimeter_Mode();