summaryrefslogtreecommitdiff
path: root/src/app/i2cdetect
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-03-11 18:01:07 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2020-03-11 18:01:07 +0100
commita929c3cf4d98ee5e17def528ab99e27335dfa539 (patch)
tree8e186a5227bb7d62e3b547b60c1cda489cd82b3f /src/app/i2cdetect
parentd90a84032348f63f8b45b718939a0e957169b8a8 (diff)
Add S5851A temperature sensor driver
Diffstat (limited to 'src/app/i2cdetect')
-rw-r--r--src/app/i2cdetect/main.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/app/i2cdetect/main.cc b/src/app/i2cdetect/main.cc
index 68c3677..4f82dc5 100644
--- a/src/app/i2cdetect/main.cc
+++ b/src/app/i2cdetect/main.cc
@@ -9,6 +9,9 @@
#ifdef DRIVER_LM75
#include "driver/lm75.h"
#endif
+#ifdef DRIVER_S5851A
+#include "driver/s5851a.h"
+#endif
#ifdef DRIVER_AM2320
#include "driver/am2320.h"
#endif
@@ -45,6 +48,10 @@ void loop(void)
kout.printf_float(lm75.getTemp());
kout << endl;
#endif
+#ifdef DRIVER_S5851A
+ kout.printf_float(s5851a.getTemp());
+ kout << endl;
+#endif
#ifdef DRIVER_AM2320
am2320.read();
if (am2320.getStatus() == 0) {
@@ -116,6 +123,12 @@ void loop(void)
kout << "CCS811 status is " << ccs811.check() << endl;
#endif
#ifdef DRIVER_HDC1080
+ /*
+ hdc1080.heater(1);
+ for (unsigned char i = 0; i < 50; i++) {
+ hdc1080.getTemp();
+ }
+ */
kout << "HDC1080 temperature " << hdc1080.getTemp() << " degC" << endl;
kout << "HDC1080 humidity " << hdc1080.getRH() << " %H" << endl;
#endif