AHT20.Calc (aht20 v0.2.1) View Source

A collection of calculation functions.

Link to this section Summary

Functions

Calculates the relative humidity in percent.

Calculates the temperature in Celsius.

Calculates the temperature in Fahrenheit.

Link to this section Functions

Link to this function

humidity_rh_from_raw(raw_humidity)

View Source

Specs

humidity_rh_from_raw(integer()) :: float()

Calculates the relative humidity in percent.

iex> AHT20.Calc.humidity_rh_from_raw(158119)
15.079402923583984
Link to this function

temperature_c_from_raw(raw_temperature)

View Source

Specs

temperature_c_from_raw(integer()) :: float()

Calculates the temperature in Celsius.

iex> AHT20.Calc.temperature_c_from_raw(410343)
28.26671600341797
Link to this function

temperature_f_from_raw(raw_temperature)

View Source

Specs

temperature_f_from_raw(integer()) :: float()

Calculates the temperature in Fahrenheit.

iex> AHT20.Calc.temperature_f_from_raw(410343)
82.88008880615234