AHT20.Calc (aht20 v0.1.0) View Source
A collection of calculation functions.
Link to this section Summary
Functions
Calculates the temperature in Celsius.
Calculates the temperature in Fahrenheit.
Obtains the humidity value from the sensor output.
Obtains the temperature value from the sensor output.
Calculates the relative humidity in percent.
Link to this section Functions
Specs
Calculates the temperature in Celsius.
iex> AHT20.Calc.celsius_from_raw_temperature(410343)
28.26671600341797
Specs
Calculates the temperature in Fahrenheit.
iex> AHT20.Calc.fahrenheit_from_raw_temperature(410343)
82.88008880615234
Specs
raw_humidity_from_sensor_output(<<_::56>>) :: integer()
Obtains the humidity value from the sensor output.
iex> AHT20.Calc.raw_humidity_from_sensor_output(<<28, 38, 154, 118, 66, 231, 118>>)
158119
Specs
raw_temperature_from_sensor_output(<<_::56>>) :: integer()
Obtains the temperature value from the sensor output.
iex> AHT20.Calc.raw_temperature_from_sensor_output(<<28, 38, 154, 118, 66, 231, 118>>)
410343
Specs
Calculates the relative humidity in percent.
iex> AHT20.Calc.relative_humidity(158119)
15.079402923583984