Question about correction factor in the code for temperatures

Hoping someone can provide an example of how I would need to modify the Sketch in order to add a compensation for the temperatures.

It’s currently running about 2 degrees Celsius warmer than it should, and would like to adjust.


In your sketch go to line 90/91 (You can enable line numbers in the Arduino Preferences).

Then after “result.t” you substract the correction temperature. You need to do this in both lines (one for the display, one for the information sent to the server).

Here is an example that substracts 1.8 degrees Celcius.

    payload=payload+"\"atmp\":" + String(result.t  - 1.8 ) +   ",\"rhum\":" + String(result.rh);
    showTextRectangle(String(result.t - 1.8 ),String(result.rh)+"%",false);

Hope that helps.

1 Like

Good useful info on the correction, thanks!