Hello, and welcome to this tutorial where I use the BMP280 to measure temperature, pressure and also altitude, with the help of an Arduino UNO board and an OLED display. Here are some of the BMP280 key parameters from its datasheet:
So for this project, we gonne use the module to measure all these stuff in both metric and imperial systems as usual, I’m not quiet sure about the units but you can always convert them through the code, and here are the components we gonna use:
After wiring your module, it’s better to test the code from the library example its name is “BMP280test”, if your module isn’t detected like in the picture below:
You can run the i²c scanner code (But unplung any other i²c device like a LCD or OLED), and if your module is not broken, or doesn’t have a solder problem, you’ll see that the device is detected by the scanner:
Now note that address and go to your library c++ file, library is usually installed in the “Documents/Arduino/Libraries”:
And open it with a proper editor, I’m using Dev c++
Then go to the line “41” and _i2caddr change the “a” with the address you found on the serial monitor:
Save all and close, the library is meant to work with modules that have 0x77 as i²c address but the one I’m using has 0x76.
Run the test code again:
I hope it works for you, and if you have any problem leave it in a comment.
Comments