您是否还将BDU位设置为寄存器
CTRL_REG4?结合0xC0 in
TEMP_CFG_REG对我有用。
OUT_TEMP_L
和OUT_TEMP_H包含25度C的偏移量。
在低功耗模式下使用就足够了
OUT_TEMP_H,只有这8位包含tempature。只需添加25并将其视为int8_t。
在高分辨率和普通模式下,您需要使用整个16位值并向右移动六次(如带符号),因为它将包含左对齐的10位值。然后再加25以获得温度。
我的经验是,这种传感器不能真正用于环境温度,内部温度会受到传感器本身的影响。
以上来自于谷歌翻译
以下为原文
Have you also set BDU bit in register
CTRL_REG4? Combined with 0xC0 in
TEMP_CFG_REG it works for me.
OUT_TEMP_L
and OUT_TEMP_H contain the offset from 25 degress C.
In low-power mode it is enough to use
OUT_TEMP_H, only these 8 bits contain the tempature. Just add 25 and treat it as int8_t.
In high-res and normal mode you need to use whole 16-bit value and shift six times to the right (as signed), as it will contain left-justified 10-bit value. Then again add 25 to get temperature.
My experience is that this sensor cannot really be used for ambient temperature and the internal temperature will affected by the sensor itself.
您是否还将BDU位设置为寄存器
CTRL_REG4?结合0xC0 in
TEMP_CFG_REG对我有用。
OUT_TEMP_L
和OUT_TEMP_H包含25度C的偏移量。
在低功耗模式下使用就足够了
OUT_TEMP_H,只有这8位包含tempature。只需添加25并将其视为int8_t。
在高分辨率和普通模式下,您需要使用整个16位值并向右移动六次(如带符号),因为它将包含左对齐的10位值。然后再加25以获得温度。
我的经验是,这种传感器不能真正用于环境温度,内部温度会受到传感器本身的影响。
以上来自于谷歌翻译
以下为原文
Have you also set BDU bit in register
CTRL_REG4? Combined with 0xC0 in
TEMP_CFG_REG it works for me.
OUT_TEMP_L
and OUT_TEMP_H contain the offset from 25 degress C.
In low-power mode it is enough to use
OUT_TEMP_H, only these 8 bits contain the tempature. Just add 25 and treat it as int8_t.
In high-res and normal mode you need to use whole 16-bit value and shift six times to the right (as signed), as it will contain left-justified 10-bit value. Then again add 25 to get temperature.
My experience is that this sensor cannot really be used for ambient temperature and the internal temperature will affected by the sensor itself.
举报