Skip to main content

milli_percent

Function milli_percent 

Source
pub fn milli_percent(raw: u16) -> u32
Expand description

Decodes the humidity register to thousandths of a percent relative humidity.

The datasheet’s RH = raw / 2^16 * 100, computed in integers and rounded to the nearest milli-percent.

§Arguments

  • raw - the 16-bit humidity register.

§Returns

The relative humidity in milli-percent, from 0 to 99 998.