Skip to content

Commit

Permalink
better calibration
Browse files Browse the repository at this point in the history
  • Loading branch information
isbkch committed Oct 9, 2020
1 parent fe52c7d commit 8e17a2b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8e17a2b

Please sign in to comment.