I'm trying to connect a BMP180 sensor to my raspian running on a banana pi board (BPI-M1). The BMP180 is connected to the GPIO pins 3 and 5. The BPI-M1 seems to have more i2c adapters as the raspberry pi.
i2detect -l
Code: Select all
i2c-0 i2c sunxi-i2c.0 I2C adapter
i2c-1 i2c sunxi-i2c.1 I2C adapter
i2c-2 i2c sunxi-i2c.2 I2C adapter
i2c-3 i2c sunxi-i2c.3 I2C adapter
i2c-4 i2c sunxi-hdmi-i2c I2C adapter
i2cdetect -y 2
Code: Select all
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- 77
Code: Select all
# Optionally you can override the bus number:
sensor = BMP085.BMP085(busnum=2)
Code: Select all
Temp = 27.90 *C
Pressure = 95266.00 Pa
Altitude = 516.41 m
Sealevel Pressure = 95271.00 Pa
Code: Select all
Error: BMP085: Error reading sensor data!...