From e391c1bc244838bb050ade946e709f671cd9cf94 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 18 Oct 2019 10:38:48 +0200 Subject: Add preliminary version of HDC1080 driver (not working reliably yet) --- include/driver/hdc1080.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 include/driver/hdc1080.h (limited to 'include/driver/hdc1080.h') diff --git a/include/driver/hdc1080.h b/include/driver/hdc1080.h new file mode 100644 index 0000000..f6f278c --- /dev/null +++ b/include/driver/hdc1080.h @@ -0,0 +1,22 @@ +#ifndef HDC1080_H +#define HDC1080_H + +class HDC1080 { + private: + HDC1080(const HDC1080 ©); + unsigned char const address = 0x40; + unsigned char txbuf[3]; + unsigned char rxbuf[2]; + + public: + HDC1080() {} + + float getTemp(); + float getRH(); + unsigned int getManufacturerID(); + void init(); +}; + +extern HDC1080 hdc1080; + +#endif -- cgit v1.2.3