HDC1000 library

Dependents:   Condensation_Monitor mbed_HDC1000 BLE_Condensation_Monitor GR-PEACH_TAMORI

See http://developer.mbed.org/users/yasuyuki/notebook/HDC1000/

Revision:
1:45126276dbf3
Parent:
0:82c214412005
--- a/HDC1000.cpp	Wed Jan 28 08:53:47 2015 +0000
+++ b/HDC1000.cpp	Fri Jul 10 15:00:59 2015 +0000
@@ -26,7 +26,7 @@
     
     // Trigger
     buf[0] = 0x00;  // Pointer
-    _i2c.write(HDC1000_ADDR, buf, 1);
+    _i2c.write(HDC1000_ADDR, buf, 1);   // with stop
 
     // Wait 6.35ms + 6.5ms
     wait_ms(20);
@@ -36,7 +36,7 @@
 
 }
 
-int HDC1000::humidity()
+unsigned short HDC1000::humidity()
 {
 
     // get hum
@@ -47,7 +47,7 @@
     
 }
 
-int HDC1000::temperature()
+unsigned short HDC1000::temperature()
 {
 
     // get temp
@@ -60,6 +60,9 @@
 
 void HDC1000::init()
 {
+
+    wait_ms(15);
+
     // Set configuration
     buf[0] = 0x02;  // Pointer
     buf[1] = 0x10;  // High byte
@@ -68,3 +71,4 @@
 }
 
 
+