我正在使用HTS221,我从中获取价值
HTS221通过I2C。
在这里,我成功地获得了您在attach .txt文件中可以看到的正确温度数据。
但是对于湿度,我正在获得价值,但它们并不符合环境。
在这里,我在控制寄存器中进行了以下设置。
读取HTS221 AV_CONFIG:0x10值为0x1B
读取HTS221 CTRL_REG1:0x20值为0x80
读取HTS221 CTRL_REG2:0x21值为0x01
读取HTS221 CTRL_REG3:0x22值为0x00
在Humidity寄存器中,我得到以下列出的值,
H_OUT(s16)= - 32768
H0_rH_x2(u8)= 33
H1_rH_x2(u8)= 72
H0_T0_OUT(s16)= 10
H1_T0_OUT(s16)= 12504
现在将上面的值放在下面的线性插值公式中,
hum_f(s16)=(H0_rH +(hum_out - hum0_t0_out)*(H1_rH - H0_rH)/(hum1_t0_out - hum0_t0_out));
我得到了hum_f = -70
这是不正确的,现在随着我增加湿度值变化但是超过100并且继续增加这是不实际的。有没有任何机构配置这个传感器并采取数据然后PLZ帮助我在这...
#hts221
以上来自于谷歌翻译
以下为原文
I am using HTS221 , and I am taking value from
HTS221 via I2C.
Here i was successful to get correct temperature data you can see in attach .txt file.
But for Humidity i am get
ting values but they are not as per environment.
Here i have made following settings in control register.
Read HTS221 AV_CONFIG: 0x10 value is 0x1B
Read HTS221 CTRL_REG1: 0x20 value is 0x80
Read HTS221 CTRL_REG2: 0x21 value is 0x01
Read HTS221 CTRL_REG3: 0x22 value is 0x00
In Humidity registers i get the following values listed below,
H_OUT(s16) = -32768
H0_rH_x2(u8) = 33
H1_rH_x2 (u8) = 72
H0_T0_OUT(s16) = 10
H1_T0_OUT(s16) = 12504
Now putting above values in below linear interpolation formula,
hum_f (s16) = (H0_rH + (hum_out - hum0_t0_out) * (H1_rH - H0_rH) / (hum1_t0_out - hum0_t0_out));
I am getting hum_f = -70
which is not correct , now as i increase humidity the value changes but is goes above 100 and keeps on increasing which is not practical. Has any body configured this sensor and took data then plz help me out in this...
#hts221