MhZ19 hex.pm version

A Elixir library to retrieve CO2 concentration value from MH-Z19 sensor.

Installation

If available in Hex, the package can be installed by adding mh_z19 to your list of dependencies in mix.exs:

def deps do
  [
    {:mh_z19, "~> 0.1.0"}
  ]
end

Usage

iex> {:ok, pid} = MhZ19.start_link
{:ok, #PID<0.1104.0>}
iex> {:ok, result} = MhZ19.measure(pid)
{:ok, %{co2_concentration: 650}}

References

Author

Kentaro Kuribayashi