Skip to content

i2c bus error when using rpi #7

Description

@gub3005

When I run the code on my rpi, I get these errors with the ADS1115 library:
Traceback (most recent call last):
File "/home/user/water.py", line 5, in
adc = Adafruit_ADS1x15.ADS1115()
File "/usr/local/lib/python3.9/dist-packages/Adafruit_ADS1x15/ADS1x15.py", line 319, in init
super(ADS1115, self).init(*args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/Adafruit_ADS1x15/ADS1x15.py", line 82, in init
self._device = i2c.get_i2c_device(address, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/Adafruit_GPIO/I2C.py", line 63, in get_i2c_device
busnum = get_default_bus()
File "/usr/local/lib/python3.9/dist-packages/Adafruit_GPIO/I2C.py", line 55, in get_default_bus
raise RuntimeError('Could not determine default I2C bus for platform.')
RuntimeError: Could not determine default I2C bus for platform.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions