Skip to content

Use BH1750 16-bit ambient light sensor in Elixir

License

Notifications You must be signed in to change notification settings

mnishiguchi/bh1750

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BH1750

Hex version API docs CI

Use BH1750 16-bit ambient light sensor in Elixir.

Installation

Add bh1750 to your list of dependencies in mix.exs:

def deps do
  [
    {:bh1750, "~> 0.2"}
  ]
end

Usage

I2C address

I2C address can be either 0x23 (default) or 0x5C.

Start a sensor server

{:ok, sensor} = BH1750.start_link

Measure the ambient light

{:ok, lux} = BH1750.measure(sensor)

For more information, see API reference.

About

Use BH1750 16-bit ambient light sensor in Elixir

Topics

Resources

License

Stars

Watchers

Forks

Languages