Skip to content

πŸ’§ Arduino library for Bosch Sensortec BME280 – combined temperature, pressure, humidity sensor. The library allows using the sensor over I2C or SPI on any board that supports Arduino.

License

Notifications You must be signed in to change notification settings

malokhvii-eduard/arduino-bme280

Repository files navigation

πŸ’§ Arduino library for Bosch Sensortec BME280

The library allows using the sensor over I2C or SPI on any board that supports Arduino.

License Husky Commitizen semantic-release Style Guide clang-format markdownlint commitlint Tested on Arduino Uno Tested on Arduino Nano Tested on NodeMCU Tested on Wemos D1 Code Coverage CI Workflow Release Workflow

πŸŽ‰ Features

✨ Getting Started

πŸ“¦ Installation

πŸ‘‰ PlatformIO

Run pio lib install "malokhvii-eduard/arduino-bme280" or declare in platformio.ini configuration file using lib_deps option. Enjoy! πŸŽ‰πŸ‘

πŸ‘‰ Arduino IDE (Library Manager)

Go to the Arduino IDE and click Tools > Manage Libraries. In the library manager dialogue that opens, enter search query Bme280. Afterward, find a library Bme280 by Eduard Malokhvii and click Install. Enjoy! πŸŽ‰πŸ‘

πŸ‘‰ Arduino IDE (Manual)

Download Bme280.zip from release assets. Once downloaded, go to the Arduino IDE and click Sketch > Include Library > Add .zip Library. In the file dialogue that opens, locate your downloaded ZIP file. Afterward, you should receive a Library Added message just above the debug window. Enjoy! πŸŽ‰πŸ‘

πŸ‘€ Usage

There are various examples to demonstrate usage of the library. The examples are listed below:

❓ FAQs

πŸ™‹β€β™‚οΈ In which units temperature, pressure, humidity are measured?

πŸ‘‰ The temperature is measured in degrees Celsius (symbol: Β°C). The pressure is measured in pascals (symbol: Pa). The humidity is measured in percentages (symbol: %).

πŸ™‹β€β™‚οΈ What settings are used by default?

πŸ‘‰ The default settings are:

  • mode – Bme280Mode::Normal
  • temperature oversampling – Bme280Oversampling::X16
  • pressure oversampling – Bme280Oversampling::X16
  • humidity oversampling – Bme280Oversampling::X16
  • filter – Bme280Filter::Off
  • standby time – Bme280StandbyTime::Ms0_5

πŸ™‹β€β™‚οΈ Are there any settings presets out-of-the-box?

πŸ‘‰ Yes. There are some settings presets out-of-the-box according to the recomendations in the datasheet. You can create settings preset by call one of factory methods in Bme280Settings. The factory methods are listed below:

  • Bme280Settings::indoor()
  • Bme280Settings::weatherMonitoring()
  • Bme280Settings::gaming()
  • Bme280Settings::humiditySensing()

πŸ™‹β€β™‚οΈ How to off one of any measurements?

πŸ‘‰ Assign Bme280Oversampling::Off to an oversampling in settings.

πŸ™‹β€β™‚οΈ How does it work?

πŸ‘‰ You can explore unit tests to see the behavior of all library members.

πŸ› οΈ Tech Stack

EditorConfig Markdown C++ PlatformIO Arduino Google Test gcovr npm clang-format Prettier markdownlint commitlint semantic-release BME280 Shields.io Git GitHub GitHub Actions

✍️ Contributing

πŸ‘πŸŽ‰ First off, thanks for taking the time to contribute! πŸŽ‰πŸ‘

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/awesome-feature)
  3. Commit your Changes (git commit -m 'Add awesome feature')
  4. Push to the Branch (git push origin feature/awesome-feature)
  5. Open a Pull Request

πŸ’– Like this project?

Leave a ⭐ if you think this project is cool or useful for you.

⚠️ License

arduino-bme280 is licenced under the MIT License. See the LICENSE for more information.

About

πŸ’§ Arduino library for Bosch Sensortec BME280 – combined temperature, pressure, humidity sensor. The library allows using the sensor over I2C or SPI on any board that supports Arduino.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

Languages