Introduction
In this tutorial we will use the Adafruit BMP280 sensor.
This sensor can measure barometric pressure and temperature with very good accuracy. Because pressure changes with altitude we can also use it as an altimeter with ±1 meter accuracy! Accuracy for barometric pressure is ±1 hPa and ±1.0°C for temperature. |
You can connect it with your Arduino board with I2C or SPI connection protocol. It has a 3.3V regulator and level shifting so you can use it with a 3V or 5V logic micro controller without any problems.
In this tutorial we will use the Arduino UNO board with this sensor and the serial monitor of Codebender to print measured values every 5 sec.
So, let’s get started!
In this tutorial we will use the Arduino UNO board with this sensor and the serial monitor of Codebender to print measured values every 5 sec.
So, let’s get started!
What you will need - Hardware
For this tutorial you will need:
|
The Circuit
The connections are pretty easy, see the above image with the breadboard circuit schematic.
We will use the I2C connection (SCL and SDA pins)
We will use the I2C connection (SCL and SDA pins)
|
Connections of the Adafruit BMP280 sensor:
|
The code using Codebender
|
Here’s the code, embedded using Codebender!
Try downloading the Codebender plugin and clicking on the “Run on Arduino” button to program your Arduino board with this sketch. And that’s it, you’ve programmed your Arduino uno board with this sketch! |
Measured values
Well done!
You have successfully completed one more “How to” tutorial and you learned how to use the Adafruit BMP280 sensor with the Arduino uno board.
I hope you liked this, let me know in the comments!
I hope you liked this, let me know in the comments!