LPS25H library

Dependents:   teensyIMU

Fork of LPS25H by yasuyuki onodera

Revision:
1:2a808d2d05ff
Parent:
0:0d2babe81a04
diff -r 0d2babe81a04 -r 2a808d2d05ff LPS25H.cpp
--- a/LPS25H.cpp	Sun Oct 12 02:42:32 2014 +0000
+++ b/LPS25H.cpp	Thu Oct 06 23:28:55 2016 +0000
@@ -36,7 +36,7 @@
 
 }
 
-long LPS25H::pressure()
+void LPS25H::readPres()
 {
 
     // XL first and H last
@@ -49,14 +49,14 @@
     // get press_high
     get(LPS25H_PRESS_OUT_H);
     press.byte.UB=buf[0];
-    return press.Val;
+    presPa =  press.Val/40.96;
  
     // hPa = press.Val / 4096
     // Pa = press.Val / 40.96   
 }
 
 
-short LPS25H::temperature()
+void LPS25H::temperature()
 {
 
     // L first and H last
@@ -66,7 +66,7 @@
     // get press_high
     get(LPS25H_TEMP_OUT_H);
     temp.byte.HB=buf[0];
-    return temp.S;
+    tempC = 42.5 + temp.S/480;
  
     // C = 42.5 + temp.S / 480
     // range:0 to 80C