LIS2DW12 temperature reading fluctuates
Hi,
I have created a small function that reads out the 8-bit temperature register in the lis2dw12 sensor. The code is shown below
status lis2dw12::temperature(int8_t *temp)
{
*temp = static_cast<int8_t>(read_reg(REG_OUT_T)) + 25;
printf("%d\r\n", *temp);
return status::OK;
}I run the function every 100ms (so 10Hz sampling). The measurements seems to be within the right range (25-26 deg C), but about every 5 to 10 sample I see some spikes where one measurement is maybe 28, 29 or even 30 deg C, which is wrong.
Below I have made a small 10 sec test where the temperature readings are plotted. If I average the datapoints the temperature is about 25.5 deg C which is what I expect.
My question is: "Is it normal to have such big fluctuations in the measured temperature valus when the sensor is placed right next to me on the desktop table... is this really within spec of the sensor?"
BR,
Carsten
