Introduction: How to Use the Adafruit BMP280 Sensor - Arduino Tutorial

About: Arduino Tutorials by Codebender.cc Team

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!

Step 1: What You Will Need

For this tutorial you will need:

  • Arduino uno
  • Breadboard (or breadboard shield)
  • Adafruit BMP280
  • Some breadboard cables

Step 2: 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)

Connections of the Adafruit BMP280 sensor:

  • Vin to Arduino 5V pin
  • 3Vo
  • GND to GDN
  • SCK to Arduino SCL pin (A5)
  • SDO
  • SDI to Arduino SDA pin (A4)
  • CS

Step 3: The Code

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!

Step 4: Measured Values

Press the "connect" button to the serial monitor of Codebender below:

Step 5: 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. There will be more of them, so make sure to click Follow button!