View Source BH1750 (bh1750 v0.2.0)

Use BH1750 16-bit ambient light sensor in Elixir.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Measures the ambient light.

Powers down the BH1750 sensor.

Instantiates a BH1750 sensor.

Link to this section Types

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

measure(server \\ BH1750)

View Source

Specs

measure(GenServer.server()) :: {:ok, 0..65535} | {:error, any()}

Measures the ambient light.

Link to this function

power_down(server \\ BH1750)

View Source

Specs

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

Powers down the BH1750 sensor.

Instantiates a BH1750 sensor.