A class library development test using TMP102 (I2C temperature sensor).

Revision:
0:89475bc39c8b
Child:
1:c9c43b132ed7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test_TMP102.h	Sat Nov 25 03:25:15 2017 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+
+// TMP102 I2C slave address(ADD0 connected to GND)
+#define ADDR_TMP102     0x90
+
+// TMP102 registers
+#define TMP102_Temp     0x00
+#define TMP102_Conf     0x01
+#define TMP102_Tlow     0x02
+#define TMP102_Thigh    0x03
+
+class test_TMP102
+{
+public:
+    test_TMP102(PinName sda, PinName scl);
+    ~test_TMP102();
+    void init(void);
+    float read(void);
+private:
+    I2C i2c;
+};
\ No newline at end of file