SainSMART BMP085 (Digital Pressure Sensor Module Board)

Post date: 2014/08/10 3:12:34

Connect Bosch BMP085 via I2C

  1. setting I2C module
    1. add 2 lines to /etc/modules
      • i2c-bcm2708 i2c-dev
    2. comment out 2 lines in /etc/modprobe.d/raspi-blackliset.conf
      • # blacklist spi-bcm2708 # blacklist i2c-bcm2708
  2. update and install module
    • $ sudo apt-get update
    • $ sudo apt-get install python-smbus i2c-tools
    • $ sudo apt-get upgrade
    • $ sudo reboot
  3. check I2C devices
    • $ sudo i2cdetect -y 1
    • 0 1 2 3 4 5 6 7 8 9 a b c d e f
    • 00: -- -- -- -- -- -- -- -- -- -- -- -- --
    • 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    • 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    • 30: -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- --
    • 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    • 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    • 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    • 70: -- -- -- -- -- -- -- 77
  4. install python module forBMP085
    • $ sudo apt-get install python-dev git build-essential
    • $ mkdir git
    • $ cd git
    • $ git clone https://github.com/adafruit/Adafruit_Python_BMP.git
    • $ cd Adafruit_Python_BMP
    • $ sudo python setup.py install
    • $ cd examples
    • $ sudo python simpletest.py
    • Temp = 28.60 *C Pressure = 98557.00 Pa
    • Altitude = 233.47 m
    • Sealevel Pressure = 98563.00 Pa
    • 正しい標高はは221.7m(by 地理院地図で右クリック). 海面気圧がおかしい?