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:
5:9edec5ee8bf4
Parent:
4:fdf14a259af8
Child:
6:03c24251e500
diff -r fdf14a259af8 -r 9edec5ee8bf4 MPL3115A2.h
--- a/MPL3115A2.h	Thu May 30 07:27:24 2013 +0000
+++ b/MPL3115A2.h	Thu Aug 22 12:03:19 2013 +0000
@@ -84,6 +84,14 @@
     * @returns altimeter value as float
     */
     float getAltimeter( void);
+
+    /**
+    * Get the altimeter value in raw mode
+    *
+    * @param    dt      pointer to unsigned char array
+    * @returns          status as 1
+    */
+    unsigned int getAltimeterRaw( unsigned char *dt);
     
     /**
     * Get the pressure value
@@ -91,6 +99,14 @@
     * @returns pressure value as float
     */
     float getPressure( void);
+
+    /**
+    * Get the pressure value in raw mode
+    *
+    * @param    dt      pointer to unsigned char array
+    * @returns          status as 1
+    */
+    unsigned int  getPressureRaw( unsigned char *dt);
     
     /**
     * Get the temperature value
@@ -98,6 +114,14 @@
     * @returns temperature value as float
     */
     float getTemperature( void);
+
+    /**
+    * Get the temperature value in raw mode
+    *
+    * @param    dt      pointer to unsigned char array
+    * @returns status as 1
+    */
+    unsigned int getTemperatureRaw( unsigned char *dt);
     
     /**
     * Set the Altimeter Mode
@@ -114,12 +138,20 @@
     void Barometric_Mode( void);
     
     /**
-    * Get the altimeter, pressure and temperature values
+    * Get the altimeter or pressure and temperature values
     *
-    * @param array of float f[3]
+    * @param array of float f[2]
     * @returns none
     */
     void getAllData( float *f);
+
+    /**
+    * Get the altimeter or pressure, and temperature values in raw mode
+    *
+    * @param array of unsigned char[5]
+    * @returns staus as 1
+    */    
+    unsigned int getAllDataRaw( unsigned char *dt);
     
     /** 
     * Return if there are date available