AHT20.State (aht20 v0.1.0) View Source

Represents the sensor state.

Link to this section Summary

Functions

Parses the sensor state byte into a human-readable struct.

Link to this section Types

Specs

t() :: %AHT20.State{
  busy: boolean(),
  calibrated: boolean(),
  mode: :cmd | :cyc | :nor
}

Link to this section Functions

Specs

from_byte(byte()) :: t()

Parses the sensor state byte into a human-readable struct.

iex> AHT20.State.from_byte(0b0001_1100)
%AHT20.State{busy: false, calibrated: true, mode: :nor}