Objective:

In this project, we will use raspberry pi to get environment temperature, pressure  from BMP180 sensor and calculate  attitude, then display the result to monitor.
Parts and Devices
1 x raspberry Pi3
1 x GPIO to Breadboard 40-pin breakout interface
1 x BMP180
USB mouse and keyboard
1 x HDMI cable and monitor(or HDMI TV)
breadboard and jump wires

Circuit Graph:

180bmp_bb

Software Installation:

1)download BMP Python Library by typing following command:

wget http://osoyoo.com/driver/Adafruit_Python_BMP.tar.gz

sudo tar zxvf  Adafruit_Python_BMP.tar.gz

2) Open I2C interface

Enter the following command in terminal: sudo nano /boot/config.txt

Move mouse point to the place as following picture, and change “#dtparam=i2c_arm=on” ( or “#dtparam=i2c_arm=off”) into “dtparam=i2c_arm=on”

Then press “ctrl” + “X” and type “Y” to save the file and exit nano editor. After this, restart your Raspberry Pi and then I2C interfact will be open.

3)install BMP Python Library

cd   Adafruit_Python_BMP

sudo python  setup.py  install

4) test BMP180 program

cd  examples

sudo python simpletest.py

5) result

after running code, you will see result as per following picture:

resault

DSC_6787