Skip to content
This repository was archived by the owner on Sep 30, 2019. It is now read-only.
This repository was archived by the owner on Sep 30, 2019. It is now read-only.

Address of I2C Bus Has Changed in V2 Board #25

Description

@geekinthesticks

I have been trying to get the BMP085 example to work and kept getting bus errors. I am using a Rev 2 board and the bus has changed from #0 to #1. The following change fixes the problem:

diff --git a/Adafruit_BMP085/Adafruit_BMP085_example.py b/Adafruit_BMP085/Adafruit_BMP085_example.py
index 5e0d0be..92b2758 100755
--- a/Adafruit_BMP085/Adafruit_BMP085_example.py
+++ b/Adafruit_BMP085/Adafruit_BMP085_example.py
@@ -7,8 +7,8 @@ from Adafruit_BMP085 import BMP085

===========================================================================

Initialise the BMP085 and use STANDARD mode (default value)

-# bmp = BMP085(0x77, debug=True)
-bmp = BMP085(0x77)
+bmp = BMP085(0x77, debug=True)
+# bmp = BMP085(0x77)

To specify a different operating mode, uncomment one of the following:

bmp = BMP085(0x77, 0) # ULTRALOWPOWER Mode

diff --git a/Adafruit_BMP085/Adafruit_I2C.py b/Adafruit_BMP085/Adafruit_I2C.py
index dd2dfa7..0855f42 100755
--- a/Adafruit_BMP085/Adafruit_I2C.py
+++ b/Adafruit_BMP085/Adafruit_I2C.py
@@ -8,7 +8,7 @@ import smbus

class Adafruit_I2C :

  • def init(self, address, bus=smbus.SMBus(0), debug=False):
  • def init(self, address, bus=smbus.SMBus(1), debug=False):
    self.address = address
    self.bus = bus
    self.debug = debug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions