Science Oxford Logo

Calibrate the temperature


Checking the temperature

The temperature sensor is very close to the ESP32, which generates heat, so will always give a value higher than the room.

Once your device is set up to show you the temperature, compare the results against a thermometer - try this in a few different areas of the room for best results and take an average.

Note: there are a lot of variables, so it is not possible to get a perfect result.


Edit the code

When you have worked out the average difference between the sensor value and the actual temperature, add the offset into the code - this is on around line 148.

ens = ENS160AHT21(interval = 30, temp_offset = 0)