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
Specs
option() :: {:name, GenServer.name()} | BH1750.Sensor.option()
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Specs
measure(GenServer.server()) :: {:ok, 0..65535} | {:error, any()}
Measures the ambient light.
Specs
power_down(GenServer.server()) :: :ok | {:error, any()}
Powers down the BH1750 sensor.
Instantiates a BH1750 sensor.