Llibrary for the WiGo MPL3115A2, I2C Precision Altimeter sensor.

Dependents:   KL25Z_Batt_Test WIGO_MPL3115A2 Multi-Sensor SPACEmk2 ... more

30/05/2013 Added and tested the data acquisition using Interrupt. Added code for Altimeter trigger Interrupt but not yet tested.

Very basic library. Under development. Need to add in order: 1. IRQ configuration. 2. FIFO mode configuration.

Revision:
1:30a04f651efe
Parent:
0:cfecfabc5e23
Child:
2:a2fcfb7ff611
diff -r cfecfabc5e23 -r 30a04f651efe MPL3115A2.h
--- a/MPL3115A2.h	Thu May 23 06:42:15 2013 +0000
+++ b/MPL3115A2.h	Thu May 23 12:42:45 2013 +0000
@@ -25,9 +25,13 @@
 * #include "MPL3115A2.h"
 * 
 * #define MPL3115A2_I2C_ADDRESS (0x60<<1)
-* MPL3115A2 altimeter(PTE0, PTE1, MPL3115A2_I2C_ADDRESS);
+* MPL3115A2 wigo_sensor1(PTE0, PTE1, MPL3115A2_I2C_ADDRESS);
 * Serial pc(USBTX, USBRX);
 *
+* // pos [0] = altitude or pressure value 
+* // pos [1] = temperature value 
+* float sensor_data[2];
+*
 * int main(void) {
 *
 *    pc.baud( 230400);
@@ -39,7 +43,7 @@
 *        //
 *        if ( wigo_sensor1.isDataAvailable()) {
 *            wigo_sensor1.getAllData( &sensor_data[0]);
-*            pc.printf("\Altitude: %f\tTemperature: %f\r\n", sensor_data[0], sensor_data[1]);
+*            pc.printf("\tAltitude: %f\tTemperature: %f\r\n", sensor_data[0], sensor_data[1]);
 *        }
 *        //
 *        wait( 0.001);