Fix si7021 temperature/humidity sensor reading
Raw reading modified according to the Silicon Labs sample code for the Si7021 sensor
This commit is contained in:
parent
53fa634908
commit
6d755943e0
1 changed files with 3 additions and 0 deletions
|
@ -139,6 +139,9 @@ static inline int16_t dht_convert_data(dht_sensor_type_t sensor_type, uint8_t ms
|
||||||
data = 0 - data; // convert it to negative
|
data = 0 - data; // convert it to negative
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (sensor_type == DHT_TYPE_SI7021) {
|
||||||
|
data = msb * 256 + (lsb & ~0x3);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
data = msb * 10;
|
data = msb * 10;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue