summaryrefslogtreecommitdiff
path: root/src/app/datalogger/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/datalogger/main.cc')
-rw-r--r--src/app/datalogger/main.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/app/datalogger/main.cc b/src/app/datalogger/main.cc
index 251d1fa..1d41ee0 100644
--- a/src/app/datalogger/main.cc
+++ b/src/app/datalogger/main.cc
@@ -13,6 +13,9 @@
#include "driver/soft_i2c.h"
#endif
+#ifdef CONFIG_driver_ads111x
+#include "driver/ads111x.h"
+#endif
#ifdef CONFIG_driver_lm75
#include "driver/lm75.h"
#endif
@@ -63,6 +66,12 @@
void loop(void)
{
+#ifdef CONFIG_driver_ads111x
+ kout << "Reading: ";
+ kout.printf_float(ads111x.readVoltage());
+ kout << " V" << endl;
+#endif
+
#ifdef CONFIG_driver_lm75
kout << "temperature_celsius: ";
kout.printf_float(lm75.getTemp());
@@ -284,6 +293,10 @@ int main(void)
kout << "I2C setup OK" << endl;
#endif
+#ifdef CONFIG_driver_ads111x
+ ads111x.configure(ADS111x::CONTINUOUS | ADS111x::FSR_4V | ADS111x::SPS_8 | ADS111x::SINGLE_3);
+#endif
+
#ifdef CONFIG_driver_bme280
bme280.intf = BME280_I2C_INTF;
bme280.read = bme680_i2c_read;