yasuyuki onodera / ADT7410

Dependents:   mbed_DEMO mbed_BLE

Revision:
1:b13511ed5965
Parent:
0:cebbc4e855af
Child:
2:f01d96ee8fda
--- a/ADT7410.cpp	Sat Oct 04 12:01:32 2014 +0000
+++ b/ADT7410.cpp	Fri Oct 10 04:39:36 2014 +0000
@@ -36,7 +36,7 @@
 
 }
 
-int ADT7410::value()
+short ADT7410::value()
 {
 
     // RDY?
@@ -44,13 +44,13 @@
 //        get(ADT7410_STATUS);
 //    }while(buf[0] & 0x80);
 
-    // get temp_high
+    // get temp_high and low
     get(ADT7410_TEMP_H);
     temp.byte.HB=buf[0];
-    // get temp_low
-//    get(ADT7410_TEMP_L);
     temp.byte.LB=buf[1];
-    return temp.Val;
+    return temp.S;
+    
+    // C = temp.S / 128
     
 }