i have a trouble with an ads1115 (under raspberry pi). Here is my python code
import smbus
bus = smbus.SMBus(1)
address = 0x49
print bus.read_byte(address)
print bus.read_i2c_block_data(address, 0x00, 2)
and the follwing issue:
17
Traceback (most recent call last):
File "test.py", line 8, in <module>
data = bus.read_i2c_block_data(address, 0x00, 2)
IOError: [Errno 121] Remote I/O error
Therefore, i guess the I2C module is ok while i have a answer of "bus.read_byte" (here 17). Especially, the i2cdetec -y 1 works at all (and the output is the address 49.
The issue is still there if i use another address of the ads1115 (with another wiring as it is said in the example of adafruit).
Update: the module ADS1115 works with an Arduino (and the Adafruit librairy) and gives good measurements.
Have you got an idea?
Solution: Ground the ADDR-Pin (ADS1115) to your RaspberryPi Ground (i use PIN9)
I really hope this helps to some, as it took me a few days to know whats the issue. Btw it is also a best practice to Ground all the unused channels.