The BMP180 barometer is the new digital barometric pressure sensor, with a very high performance, which enables applications in advanced mobile devices, such as smart phones, tablets and sports devices. It complies with the BMP085 but boasts many improvements, like a smaller size and more digital interfaces.

Components

-1 * Raspberry Pi

- 1 * Breadboard

- 4 * Jumper wires (Male to Male, 2 red and 2 black)

- 1 * Network cable (or USB wireless network adapter)

- 1 * Barometer module

- 1 * 4-Pin anti-reverse cable

Experimental Principle

Use a barometer to measure air pressure and temperature.

The schematic diagram of the module is as follows:

Experimental Procedures

Step 1: Build the circuit

Raspberry Pi

T-Cobbler

Barometer Module

SCL

SCL1

SCL

SDA

SDA1

SDA

5V

5V0

VCC

GND

GND

GND

Step2: Setup I2C (see Appendix 1. If you have set I2C, skip this step.)

For C language users:

Step 3: Download libi2c-dev

sudo apt-get install libi2c-dev

Step 4: Change directory

cd /home/pi/SunFounder_SensorKit_for_RPi2/C/31_barometer/

Step 5: Compile

gcc barometer.c bmp180.c -lm

Step 6: Run

sudo ./a.out

For Python users:

Step 3: Install smbus for I2C

sudo apt-get install python-smbus i2c-tools

Step 4: We'll need to install some utilities for the Raspberry Pi to communicate over I2C.

sudo apt-get install build-essential python-dev python-smbus

cd ~

git clone https://github.com/sunfounder/Adafruit_Python_BMP.git

cd Adafruit_Python_BMP

sudo python setup.py install

Step 5: Change directory

cd /home/pi/SunFounder_SensorKit_for_RPi2/Python/

Step 6: Run

sudo python 31_barometer.py

Now you can see the temperature and pressure value displayed on the screen.