SCD4X (scd4x v0.1.1) View Source

Use Sensirion SCD4X CO2 sensor in Elixir

Link to this section Summary

Types

Which I2C bus to use (defaults to "i2c-1")

Link to this section Types

Specs

bus_name() :: binary()

Which I2C bus to use (defaults to "i2c-1")

Specs

options() :: [GenServer.option() | {:bus_name, bus_name()}]

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Specs

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

Specs

measure(GenServer.server(), :single_shot) ::
  {:ok, SCD4X.Measurement.t()} | {:error, any()}
Link to this function

measure_single_shot(server)

View Source
This function is deprecated. Use measure/2 with :single_shot option instead.
Link to this function

start_link(init_arg \\ [])

View Source

Specs

start_link(options()) :: GenServer.on_start()
Link to this function

start_periodic_measurement(server)

View Source

Specs

start_periodic_measurement(GenServer.server()) :: :ok | {:error, any()}
Link to this function

stop_periodic_measurement(server)

View Source

Specs

stop_periodic_measurement(GenServer.server()) :: :ok | {:error, any()}