Llibrary for the WiGo MPL3115A2, I2C Precision Altimeter sensor. This is a temp fork
Dependents: sensor AerCloud_MutliTech_Socket_Modem_Example Freescale_Multi-Sensor_Shield 2lemetry_Sensor_Example ... more
Fork of MPL3115A2 by
Revision 1:30a04f651efe, committed 2013-05-23
- Comitter:
- clemente
- Date:
- Thu May 23 12:42:45 2013 +0000
- Parent:
- 0:cfecfabc5e23
- Child:
- 2:a2fcfb7ff611
- Commit message:
- Corrected the example code inside the MPL3115A2.h file.
Changed in this revision
MPL3115A2.h | Show annotated file Show diff for this revision Revisions of this file |
--- 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);