AHT20 (aht20 v0.2.2) View Source

Read temperature and humidity from a AHT20 sensor.

Link to this section Summary

Types

AHT20 GenServer start_link options

Functions

Returns a specification to start this module under a supervisor.

Detect devices on I2C buses.

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

options() :: [{:name, GenServer.name()}] | AHT20.Sensor.config()

AHT20 GenServer start_link options

  • :name - a name for the GenServer
  • :bus_name - which I2C bus to use (e.g., "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.

Detect devices on I2C buses.

Link to this function

measure(server \\ __MODULE__)

View Source
Link to this function

read(server \\ __MODULE__)

View Source
This function is deprecated. Use AHT20.measure/1 instead.
Link to this function

read_data(server \\ __MODULE__)

View Source
This function is deprecated. Use AHT20.measure/1 instead.
Link to this function

read_state(server \\ __MODULE__)

View Source
This function is deprecated. Will be removed in next release.

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.