I2C 接続の温度センサ ADT7410 用のライブラリ. Library for temperature sensor ADT7410 connected using I2C interface.

Dependents:   Mbed2_ConnectTestAll Demo_ADT7410

Revision:
1:ad3046485a3e
Parent:
0:b6dc7c54b451
Child:
2:c134a43c7875
diff -r b6dc7c54b451 -r ad3046485a3e ADT7410.hpp
--- a/ADT7410.hpp	Mon Jun 15 05:43:19 2015 +0000
+++ b/ADT7410.hpp	Mon Jun 15 07:26:05 2015 +0000
@@ -1,6 +1,6 @@
 //--------------------------------------------------------------
 //  Class for using ADT7410 (Header)
-//  2015/06/10, Copyright (c) 2015 MIKAMI, Naoki
+//  2015/06/15, Copyright (c) 2015 MIKAMI, Naoki
 //--------------------------------------------------------------
 
 #ifndef ADT7410_HPP
@@ -24,8 +24,14 @@
         // Get value in configuration register
         uint8_t GetConfig();
 
-        // Get temperature
-        float Get();
+        // Read temperature
+        float Read();
+        
+        // Operator shorthand for Read()
+        operator float() { return Read(); }
+
+        // Reset
+        void Reset();
 
     protected:
         // Write single byte
@@ -42,9 +48,6 @@
         
         const uint8_t addr_;    // left-justified 7-bit slave address of ADT7410
         I2C i2c_;               // Object of I2C
-
-        // Reset
-        void Reset();
     };
 }
 #endif  // ADT7410_HPP
\ No newline at end of file