MPL3115A2 20 to 110kPa, Absolute Digital Pressure Sensor

Dependents:   test_MPL3115A2 test_MPL3115A2 testSensor Lab9-1 ... more

Files at this revision

API Documentation at this revision

Comitter:
Rhyme
Date:
Wed Aug 23 12:37:18 2017 +0000
Parent:
1:6fdcf150410e
Commit message:
in getPressure(void) activate() and oneShot() was missing

Changed in this revision

MPL3115A2.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 6fdcf150410e -r 12223b4c88b1 MPL3115A2.cpp
--- a/MPL3115A2.cpp	Thu May 18 06:30:44 2017 +0000
+++ b/MPL3115A2.cpp	Wed Aug 23 12:37:18 2017 +0000
@@ -132,6 +132,8 @@
     standby() ;
     modeBar() ;
     sample_time = getSampleTime() ;
+    activate() ;
+    oneShot() ;
     wait_ms(sample_time) ;
     readRegs(MPL_OUT_P_MSB, tmp, 3) ;
     data = ((tmp[0]<<16)|(tmp[1]<<8)|(tmp[2])) >> 6  ;