- π Easy to use
- ποΈ Zero dependencies
- βοΈ I2C or SPI
- π§ͺ 100% code coverage
- βοΈ Tested on: Arduino Uno, Arduino Nano, NodeMCU, Wemos D1
π 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! ππ
There are various examples to demonstrate usage of the library. The examples are listed below:
- TwoWire.ino β read temperature, pressure, humidity over I2C
- FourWire.ino β read temperature, pressure, humidity over SPI
- Settings.ino β set different settings
π The temperature is measured in degrees Celsius (symbol: Β°C
).
The pressure is measured in pascals (symbol: Pa
). The humidity is measured
in percentages (symbol: %
).
π 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
π 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()
π Assign Bme280Oversampling::Off
to an oversampling in settings.
π You can explore unit tests to see the behavior of all library members.
ππ 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.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/awesome-feature
) - Commit your Changes (
git commit -m 'Add awesome feature'
) - Push to the Branch (
git push origin feature/awesome-feature
) - Open a Pull Request
Leave a β if you think this project is cool or useful for you.
arduino-bme280
is licenced under the MIT License. See the LICENSE
for more information.