{"id":16732678,"url":"https://github.com/lucaong/elixir_bme680","last_synced_at":"2025-03-21T21:31:22.039Z","repository":{"id":54380967,"uuid":"156565080","full_name":"lucaong/elixir_bme680","owner":"lucaong","description":"An Elixir library to interface with the BME680 (and BME280) environmental sensor","archived":false,"fork":false,"pushed_at":"2021-02-22T09:12:18.000Z","size":87,"stargazers_count":19,"open_issues_count":0,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-18T05:34:19.275Z","etag":null,"topics":["air-quality","elixir","iot","nerves","sensor"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucaong.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-07T15:13:35.000Z","updated_at":"2022-11-19T17:37:52.000Z","dependencies_parsed_at":"2022-08-13T14:00:40.840Z","dependency_job_id":null,"html_url":"https://github.com/lucaong/elixir_bme680","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucaong%2Felixir_bme680","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucaong%2Felixir_bme680/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucaong%2Felixir_bme680/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucaong%2Felixir_bme680/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucaong","download_url":"https://codeload.github.com/lucaong/elixir_bme680/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244874208,"owners_count":20524576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["air-quality","elixir","iot","nerves","sensor"],"created_at":"2024-10-12T23:46:11.240Z","updated_at":"2025-03-21T21:31:21.564Z","avatar_url":"https://github.com/lucaong.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elixir Bme680\n\n[![Build Status](https://travis-ci.org/lucaong/elixir_bme680.svg?branch=master)](https://travis-ci.org/lucaong/elixir_bme680) [![Hex Version](https://img.shields.io/hexpm/v/elixir_bme680.svg)](https://hex.pm/packages/elixir_bme680) [![docs](https://img.shields.io/badge/docs-hexpm-blue.svg)](https://hexdocs.pm/elixir_bme680/)\n\nAn Elixir library to interface with the BME680 and BME280 environmental sensors. The BME680\nprovides measurements of temperature, pressure, humidity, and gas resistance\n(which is a proxy of indoor air quality). The BME280 is a lower cost device that only\nprovides measurements of temperature, pressure, humidity.\n\n## Installation\n\nThe package can be installed\nby adding `elixir_bme680` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:elixir_bme680, \"~\u003e 0.2.2\"}\n  ]\nend\n```\n\nThe Linux I2C driver needs to be installed for this library to work (e.g.\n`libi2c-dev` on Debian). If using [Nerves](https://nerves-project.org), the\ndriver should already be installed by default.\n\n## Configuration\n\nDepending on your hardware configuration, you may need to specify options to `Bme680.start_link/2` or `Bme280.start_link/2`.\nFor example, the i2c address of the sensor can be `0x76` or `0x77`.\n\n## Usage with the BME680\n\n```elixir\n{:ok, pid} = Bme680.start_link(i2c_address: 0x76)\n\nmeasurement = Bme680.measure(pid)\n\n# Measurement is like:\n#\n#   %Bme680.Measurement{\n#     temperature: 21.74,\n#     pressure: 1090.52,\n#     humidity: 45.32,\n#     gas_resistance: 10235\n#   }\n#\n# Where temperature is in degrees Celsius, pressure in hPa, humidity in %\n# relative humidity, and gas_resistance in Ohm\n```\n\nFor more information, read the [API documentation](https://hexdocs.pm/elixir_bme680/Bme680.html).\n\n### Sensor compatibility\n\nThe default setting has been tested on the [Pimoroni\nBME680](https://shop.pimoroni.com/products/bme680-breakout). The [Adafruit\nBME680](https://www.adafruit.com/product/3660) requires using a different i2c\naddress. For the Adafruit, pass in the `i2c_address` option with value `0x77` as\nfollows:\n\n```elixir\nBme680.start_link(i2c_address: 0x77)\n```\n\n### Note on gas resistance sensor warm up on the BME680\n\nNote that, due to the nature of the BME680 gas resistance sensor, the gas\nresistance measurement needs a warm-up in order to give stable measurements. One\npossible strategy is to perform continuous meaurements in a loop until the value\nstabilizes. That might take from a few seconds to several minutes (or more when\nthe sensor is brand new).\n\n## Usage with the BME280\n\n```elixir\n{:ok, pid} = Bme280.start_link(i2c_address: 0x76)\n\nmeasurement = Bme280.measure(pid)\n\n# Measurement is like:\n#\n#   %Bme280.Measurement{\n#     temperature: 21.74,\n#     pressure: 30.52,\n#     humidity: 45.32\n#   }\n#\n# Where temperature is in degrees Celsius, pressure in inHg, humidity in %\n# relative humidity\n```\n\nFor more information, read the [API documentation](https://hexdocs.pm/elixir_bme680/Bme280.html).\n\n### Sensor compatibility\n\nThe default setting has been tested on the [HiLetgo\nBME280](https://www.amazon.com/gp/product/B01N47LZ4P/).\n\n## Acknowledgements\n\nThis project contains low-level code from the [BME680 driver by\nBosch](https://github.com/BoschSensortec/BME680_driver) and the\n[BME280 driver by Bosch](https://github.com/BoschSensortec/BME280_driver).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucaong%2Felixir_bme680","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucaong%2Felixir_bme680","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucaong%2Felixir_bme680/lists"}