Elixir Bme680

Build Status

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.4"}
]
end

The Linux I2C driver needs to be installed for this library to work (e.g. libi2c-dev on Debian).

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