AHT20 (aht20 v0.4.0) View Source

Read temperature and humidity from AHT20 sensor in Elixir.

Link to this section Summary

Types

AHT20 GenServer start_link options

Functions

Returns a specification to start this module under a supervisor.

Start a new GenServer for interacting with a AHT20. Normally, you'll want to pass the :bus_name option to specify the I2C bus going to the AHT20.

Link to this section Types

Specs

bus_address() :: 0..127

Specs

bus_name() :: binary()

Specs

options() :: [
  name: GenServer.name(),
  bus_name: bus_name(),
  bus_address: bus_address()
]

AHT20 GenServer start_link options

  • :name - a name for the GenServer
  • :bus_name - which I2C bus to use (defaults to "i2c-1")
  • :bus_address - the address of the AHT20 (defaults to 0x38)

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

start_link(init_arg \\ [])

View Source

Specs

start_link(options()) :: GenServer.on_start()

Start a new GenServer for interacting with a AHT20. Normally, you'll want to pass the :bus_name option to specify the I2C bus going to the AHT20.