You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 30, 2019. It is now read-only.
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.