Skip to content

Commit bf02ea1

Browse files
Apply suggestions from code review
Co-authored-by: Renat0Ribeir0 <[email protected]>
1 parent 1f6a006 commit bf02ea1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

content/Hardware Support/Shields and Carriers/How-to-calibrate-the-internal-temperature-sensor.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
2-
title: "How to calibrate the internal temperature sensor"
2+
title: "Calibrate the internal temperature sensor on an Arduino device"
33
id: 4411202645778
44
---
55

6-
When working with internal temperature sensors, such as those found on boards like the Arduino MKR IoT Carrier or the Nicla Sense ME, one common issue is inaccurate temperature readings due to self-heating. Self-heating occurs because components on the board generate heat, which can lead to temperature readings higher than the actual environmental temperature. Factors like power usage, board positioning, and the running code can increase the impact of this effect.
6+
When using devices with internal temperature sensors, such as the Arduino Nicla Sense ME or the Arduino MKR IoT Carrier, a common issue is inaccurate temperature readings due to self-heating. This happens because heat generated by other components on the device can affect the sensor, leading to higher readings than the actual ambient temperature. Factors like power supply, board positioning, and the specific code running on the device can increase the impact of this effect.
7+
8+
Calibrating the internal sensor can correct these inaccuracies, giving you more accurate temperature readings.
79

810
## Steps to calibrate the temperature sensor
911

@@ -19,12 +21,12 @@ When working with internal temperature sensors, such as those found on boards li
1921

2022
### Implement the offset in your sketch
2123

22-
Once you have determined the offset, you can adjust the temperature readings in your sketch. Locate the part of the code that retrieves the temperature value and apply the offset by either adding or subtracting it based on whether your sensor reads higher or lower than the actual temperature.
24+
Once you have determined the offset, you can adjust the temperature readings in your sketch. Locate the part of the code that retrieves the temperature value and subtract the offset. For example:
2325

2426
```
2527
float temperature = sensor.readTemperature(); // Function to get temperature from the sensor
2628
2729
float offset = 5; // Your calculated offset
2830
29-
float calibratedTemperature = temperature - offset;
31+
float calibratedTemperature = temperature - offset; // Apply the offset
3032
```

0 commit comments

Comments
 (0)