SHT4X.Measurement (sht4x v0.3.2)

View Source

One sensor measurement

Summary

Types

t()

@type t() :: %SHT4X.Measurement{
  dew_point_c: float() | nil,
  humidity_rh: float(),
  quality: SHT4X.quality(),
  raw_reading_humidity: integer(),
  raw_reading_temperature: integer(),
  temperature_c: float(),
  timestamp_ms: integer()
}

Functions

from_raw(arg)

Interprets one raw temperature/humidity message

This returns a Measurement struct with the raw register values and their interpreted temperature and humidity. It does not apply any compensation so this is real temperature and humidity detected.

humidity_rh_to_raw(rh)

@spec humidity_rh_to_raw(float()) :: integer()

raw_to_humidity_rh(raw_rh)

@spec raw_to_humidity_rh(0..65535) :: float()

raw_to_temperature_c(raw_t)

@spec raw_to_temperature_c(0..65535) :: float()

temperature_c_to_raw(t)

@spec temperature_c_to_raw(float()) :: integer()