User Manual
144
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/adafruit/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.










