Elixir Bme680
An Elixir library to interface with the BME680 environmental sensor.
Installation
The package can be installed
by adding elixir_bme680
to your list of dependencies in mix.exs
:
def deps do
[
{:elixir_bme680, "~> 0.1.2"}
]
end
Usage
{:ok, pid} = Bme680.start_link()
measurement = Bme680.measure(pid)
# Measurement is like:
#
# %Bme680.Measurement{
# temperature: 21.74,
# pressure: 1090.52,
# humidity: 45.32,
# gas_resistance: 10235
# }
#
# Where temperature is in degrees Celsius, pressure in hPa, humidity in %
# relative humidity, and gas_resistance in Ohm
For more information, read the API documentation.
Acknowledgements
This project contains low-level code from the BME680 driver by Bosh