Atlas Scientific : An EZO Integration for Elixir

Supported EZO Circuits:

Installation

The package can be installed by adding atlas_scientific to your list of dependencies in mix.exs:

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

And documentation can be found at https://hexdocs.pm/atla_scientific.

Usage

defmodule MyApp.Application do
  use Application

  @impl true
  def start(_type, _args) do
    opts = [strategy: :one_for_one, name: MyApp.Supervisor]

    children =
      [
        AtlasScientific.Ezo.ORP,
        AtlasScientific.Ezo.PH,
        AtlasScientific.Ezo.RTD
      ] ++ children(target())

    Supervisor.start_link(children, opts)
  end
end

or

{:ok, _pid} = GenServer.start_link(AtlasScientific.Ezo.RTD, [], name: AtlasScientific.Ezo.RTD)

This allows you to access sensor readings with:

iex(1)> AtlasScientific.Ezo.RTD.read_temp()
{:ok, 15.0}

Smoothing readings over time

...

Metics for NervesHub/NervesCloud

...

More to come ...