View Source AHT20 (aht20 v0.4.3)

Read temperature and humidity from AHT20 sensor in Elixir.

Summary

Types

AHT20 GenServer start_link options

Functions

Returns a specification to start this module under a supervisor.

Measures the current temperature and humidity.

Starts a new GenServer for interacting with a AHT20.

Types

@type option() :: {:name, GenServer.name()} | {:bus_name, String.t()}

AHT20 GenServer start_link options

  • :name - a name for the GenServer
  • :bus_name - which I2C bus to use (defaults to "i2c-1")

Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

@spec measure(GenServer.server()) :: {:ok, AHT20.Measurement.t()} | {:error, any()}

Measures the current temperature and humidity.

Link to this function

start_link(init_arg \\ [])

View Source
@spec start_link([option()]) :: GenServer.on_start()

Starts a new GenServer for interacting with a AHT20.