View Source SHT4X (sht4x v0.1.3)
Use Sensirion SHT4X humidity and temperature sensors in Elixir
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Measure the current temperature and pressure. An error is returned if the I2C transactions fail.
Start a new GenServer for interacting with a SHT4X.
Link to this section Types
@type options() :: [GenServer.option() | {:bus_name, binary()}]
SHT4X GenServer start_link options
:name
- a name for the GenServer:bus_name
- which I2C bus to use (e.g.,"i2c-1"
):retries
- the number of retries before failing (defaults to no retries)
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec measure(GenServer.server(), Keyword.t()) :: {:ok, SHT4X.Measurement.t()} | {:error, any()}
Measure the current temperature and pressure. An error is returned if the I2C transactions fail.
@spec start_link(options()) :: GenServer.on_start()
Start a new GenServer for interacting with a SHT4X.