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);