From 8e17a2bf70f68cf18722d70f6ffaa26e2cb9a3ce Mon Sep 17 00:00:00 2001 From: iLyas Date: Fri, 9 Oct 2020 11:30:45 -0400 Subject: [PATCH] better calibration --- src/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 5f7cf3f..f9c9473 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -138,8 +138,9 @@ void loop() { float heatIndex = temperatureSensor.computeHeatIndex(temperature, humidity, false); float uvIndex = analogRead(uvAnalogIn); - // integer index, divide by 100! - uvIndex /= 100.0; + // divide by 10: This value will depend on the + // sensor and the library used, if any + uvIndex /= 10.0; // check whether reading was successful or not if (temperature == NAN || humidity == NAN) { // NAN means no available data