Wiring ---> 3.3 volts - to vcc on board ---> ground - to gnd on board ---> SDA - to sda on board ---> SLC - to scl on board Wiring, BMP085 Locating the sensor root@lemaker:~# ls -l /dev/i2c* crw-rw---T 1 root i2c 89, 0 Sep 19 14:43 /dev/i2c-0 crw-rw---T 1 root i2c 89, 1 Sep 19 14:43 /dev/i2c-1 crw-rw---T 1 root i2c 89, 2 Sep 19 14:43 /dev/i2c-2 crw-rw---T 1 root i2c 89, 3 Sep 19 14:43 /dev/i2c-3 crw-rw---T 1 root i2c 89, 4 Sep 19 14:43 /dev/i2c-4 As you can see there are 5 I2C buses. With the i2cdetect tool we are looking for the 0x77 address , which is the BMP085. # -y 0, -y 1 etc sudo i2cdetect -y 2 We are using the Adafruit BMP Python Library to access the sensor. sudo apt-get install git build-essential python-dev python-smbus git clone https://github.com/adafruit/Adafruit_Python_BMP.git cd Adafruit_Python_BMP sudo python setup.py install There are some example scripts in the examples folder. cd examples # we need to change the bus number nano
A blog about Linux, Debian, Ubuntu, Raspberry Pi and Python.