micro:bit and bmp180 sensor example

This bmp180 from Bosch is the best low-cost sensing solution for measuring barometric pressure and temperature. The sensor is soldered onto a PCB with a 3.3V regulator, I2C level shifter and pull-up resistors on the I2C pins. The BMP180 replaces the BMP085.


  • Pressure sensing range: 300-1100 hPa (9000m to -500m above sea level)
  • Up to 0.03hPa / 0.25m resolution
  • -40 to +85°C operational range, +-2°C temperature accuracy

Here is a breakout which makes it easy to use the sensor, link at the bottom.

bmp180 module
bmp180 module


Wiring and layout

Make the following connections


3V3 <-> VIN (or 3Vo)

P19 <-> SCL

P20 <-> SDA

Here is a layout drawn in fritzing

microbit and bmp180
microbit and bmp180



You will need the Adafruit BMP085 library for this example, you can either download it or use the library manager in newer Arduino IDEs.


In this example I am only looking at the temperature and pressure but there are other functions in the library

[codesyntax lang=”cpp”]

#include <Wire.h>
#include <Adafruit_BMP085.h>

Adafruit_BMP085 bmp;

void setup() 
  if (!bmp.begin()) 
    Serial.println("Could not find BMP180 or BMP085 sensor at 0x77");
    while (1) {}

void loop() 
  Serial.print("Temperature = ");
  Serial.println(" Celsius");

  Serial.print("Pressure = ");
  Serial.println(" Pascal");





Open the Serial monitor and you should see something like this

Temperature = 20.10 Celsius
Pressure = 100775 Pascal

Temperature = 20.00 Celsius
Pressure = 100773 Pascal

Temperature = 19.90 Celsius
Pressure = 100778 Pascal

Temperature = 25.80 Celsius
Pressure = 100835 Pascal


Free Shipping 1PC BMP180 Digital Barometric Pressure Sensor Board Module compatible with BMP085 For Arduino

Leave a Comment

This div height required for enabling the sticky sidebar
Ad Clicks : Ad Views : Ad Clicks : Ad Views :