From 7fcf4a593a8a1b3cb17f113cbf9659659b2ce1b8 Mon Sep 17 00:00:00 2001 From: Th-Be <3-thomas@users.noreply.localhost> Date: Fri, 2 Aug 2019 10:28:14 +0200 Subject: [PATCH] Lichtsensor auf Display --- src/main.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 63538c0..de52e98 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -374,6 +374,31 @@ void displayValues() { display.setCursor(200,y_offset+110); display.printf("%.1f", uvb); + + float lux; + if (vu_active) { + lux = sensor_readings.lux; + + } else if (!isnan(sensors_a4cf1211c3e4.lux)) { + lux = sensors_a4cf1211c3e4.lux; + + } else if (!isnan(sensors_246f28d1fa5c.lux)) { + lux = sensors_246f28d1fa5c.lux; + + } else if (!isnan(sensors_246f28d1a080.lux)) { + lux = sensors_246f28d1a080.lux; + + } else { + lux = NAN; + + } + display.setCursor(200,y_offset+120); + display.println("LUX"); + display.setCursor(200,y_offset+130); + display.printf("%.1f", lux); + + + // other nodes display.setFont(NULL); display.setCursor(0, y_offset+70);