20170911
Dependents: Hexi_Click_HDC1000 Hexi_Click_HDC1000_v2
Diff: HDC1000.cpp
- Revision:
- 1:383429056bd4
- Parent:
- 0:2dee66cf94c2
--- a/HDC1000.cpp Mon Sep 11 02:06:47 2017 +0000
+++ b/HDC1000.cpp Tue Sep 19 08:24:26 2017 +0000
@@ -63,6 +63,19 @@
return (tmp * 1.8f) + 32.0f ;
}
+uint16_t HDC1000::send_temp()
+{
+ float tmp = temperature();
+ tmp = temp;
+ return (uint16_t)((tmp * 1.8f) + 32.0f) ;
+}
+
+uint16_t HDC1000::send_humi()
+{
+ float tmp = humidity();
+ tmp = humi;
+ return (uint16_t)((tmp * 100.0f) / 65536.0f) ;
+}
/////////////// Read data from sensor /////////////////////
float HDC1000::humidity()