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
1）download BMP Python Library by typing following command:
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
sudo python setup.py install
4) test BMP180 program
sudo python simpletest.py
after running code, you will see result as per following picture:
DownLoad Url osoyoo.com