20170911
Dependents: Hexi_Click_HDC1000 Hexi_Click_HDC1000_v2
Revision 1:383429056bd4, committed 2017-09-19
- Comitter:
- i_am_kitsune
- Date:
- Tue Sep 19 08:24:26 2017 +0000
- Parent:
- 0:2dee66cf94c2
- Commit message:
- HEXIWEAR HDC1000 CLICK BOARD
Changed in this revision
| HDC1000.cpp | Show annotated file Show diff for this revision Revisions of this file |
| HDC1000.h | Show annotated file Show diff for this revision Revisions of this file |
--- 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()
--- a/HDC1000.h Mon Sep 11 02:06:47 2017 +0000
+++ b/HDC1000.h Tue Sep 19 08:24:26 2017 +0000
@@ -85,7 +85,10 @@
float temperature(void);
float conv_c_to_f(void);
-
+
+ uint16_t send_temp(void);
+ uint16_t send_humi(void);
+
/** Read humidity data
* @param none
* @return humidity