sht3x v0.1.0 SHT3x View Source

I2C driver for the SHT3x-DIS Humidity and Temperature Sensor from Sensirion.

Usage

{:ok, i2c_pid} = ElixirALE.I2C.start_link(“i2c-1”, 0x44) [{:ok, temp}, {:ok, humidity}] = SHT3x.single_shot_result(i2c_pid, :high, true)

Link to this section Summary

Types

Measurements per second. One in 0.5 | 1 | 2 | 4 | 10

16bit temperature and humidity values along with respective 8 bit CRC values

Measurement repeatability: high, medium or low

Ordered list of results: temperature, humidity

Ordered list of results: [temperature, humidity]

16bit status plus 8 bit CRC

Link to this section Types

Link to this type mps() View Source
mps() :: float() | 1 | 2 | 4 | 10

Measurements per second. One in 0.5 | 1 | 2 | 4 | 10.

Link to this type reading() View Source
reading() :: <<_::48>>

16bit temperature and humidity values along with respective 8 bit CRC values.

Link to this type repeatability() View Source
repeatability() :: :high | :medium | :low

Measurement repeatability: high, medium or low.

Link to this type result() View Source
result() :: {:ok, float()} | {:error, :crc_failed}

Ordered list of results: temperature, humidity.

Link to this type result_list() View Source
result_list() :: [result()]

Ordered list of results: [temperature, humidity].

Link to this type status() View Source
status() :: <<_::24>>

16bit status plus 8 bit CRC.

Link to this section Functions

Link to this function art(i2c_pid) View Source
art(pid()) :: :ok | :error
Link to this function break(i2c_pid) View Source
break(pid()) :: :ok | :error
Link to this function calc_humidity(raw_humidity) View Source
Link to this function clear_status(i2c_pid) View Source
clear_status(pid()) :: :ok | :error
Link to this function fetch_data(i2c_pid) View Source
fetch_data(pid()) :: reading()
Link to this function fetch_data_result(i2c_pid) View Source
fetch_data_result(pid()) :: result_list()
Link to this function heater_disable(i2c_pid) View Source
heater_disable(pid()) :: :ok | :error
Link to this function heater_enable(i2c_pid) View Source
heater_enable(pid()) :: :ok | :error
Link to this function periodic(i2c_pid, repeatability, mps) View Source
periodic(pid(), repeatability(), mps()) :: :ok | :error
Link to this function single_shot(i2c_pid, repeatability, clock_stretching) View Source
single_shot(pid(), repeatability(), boolean()) :: reading()
Link to this function single_shot_result(i2c_pid, repeatability, clock_stretching) View Source
single_shot_result(pid(), repeatability(), boolean()) :: result_list()
Link to this function soft_reset(i2c_pid) View Source
soft_reset(pid()) :: :ok | :error
Link to this function status(i2c_pid) View Source
status(pid()) :: status()