AHT20.Measurement (aht20 v0.3.1) View Source

One sensor measurement report.

Link to this section Summary

Functions

Converts raw sensor output into human-readable struct.

Link to this section Types

Specs

t() :: %AHT20.Measurement{
  humidity_rh: number(),
  temperature_c: number(),
  temperature_f: number()
}

Link to this section Functions

Converts raw sensor output into human-readable struct.

iex> AHT20.Measurement.from_sensor_output(<<28, 38, 154, 118, 66, 231, 118>>)
%AHT20.Measurement{
  humidity_rh: 15.079402923583984,
  temperature_c: 28.26671600341797,
  temperature_f: 82.88008880615234
}