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.

ADS1x15 Error: "Error accessing 0x48: Check your I2C address" #85

@mwyatt2

Description

@mwyatt2

I keep receiving the following error:

pi@raspberrypi ~/ADS1115 $ python ads1x15_ex_singleended.py
Error accessing 0x48: Check your I2C address
Error accessing 0x48: Check your I2C address
Traceback (most recent call last):
File "ads1x15_ex_singleended.py", line 38, in
volts = adc.readADCSingleEnded(0, gain, sps) / 1000
File "/home/pi/ADS1115/Adafruit_ADS1x15.py", line 223, in readADCSingleEnded
val = (result[0] << 8) | (result[1])
TypeError: 'int' object has no attribute 'getitem'

I read the comment in ADS1x15.py that states:

133 # Depending on if you have an old or a new Raspberry Pi, you
134 # may need to change the I2C bus. Older Pis use SMBus 0,
135 # whereas new Pis use SMBus 1. If you see an error like:
136 # 'Error accessing 0x48: Check your I2C address '
137 # change the SMBus number in the initializer below!

Although, I do not know what exactly what I am required to change.

I know it would be very difficult to diagnose my issue with only the information that I have provided, but I would greatly appreciate any help in troubleshooting this issue.

Thanks in advance for any help you may provide!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions