Home Code BMP180 barometric pressure sensor example

BMP180 barometric pressure sensor example

by shedboy71

I recently acquired a BMP180 barometric pressure sensor and was pleased to see that it used the BMP085 library from Adafruit, what I was interested in was how accurate the altitude reading was. This is a picture of the breakout I used



Here is a quick wiring diagram, the critical thing here is that VCC is 3.3v

UNO and BMP180

UNO and BMP180


#include <Wire.h>
#include <Adafruit_BMP085.h>
// Connect VCC of the BMP180 sensor to 3.3V
// Connect GND to Ground
// Connect SCL to i2c clock  thats A5
// Connect SDA to i2c data  thats A4
Adafruit_BMP085 bmp;
void setup() 
  if (!bmp.begin()) 
	Serial.println("BMP180 sensor not found");
	while (1) {}
void loop() {
    Serial.print("Temperature = ");
    Serial.println(" *C");
    Serial.print("Altitude = ");
    Serial.println(" meters");


this was the reading from the serial monitor

Temperature = 22.90 *C
Altitude = 103.32 meters

To see how accurate this was I went to¬†http://elevationmap.net and typed in my address, the stated elevation was 99m. Given that there was probably an additional couple of metres where the device was located in my house that’s not too bad accuracy wise


1PCS GY-68 BMP180 Replace BMP085 Digital Barometric Pressure Sensor Module For Arduino


You may also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More