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?
this is my sample code while reading ads1115 on windows 10 iot and raspbery pi, i think helpfull for you
// here is important, setup i2c device firstly
// you must send this bytes. this must be send just one time
// and now we are reading data, you can read data in a loop but best way use alert pin. ads1115 has an alert pin and send and alert when ready for read, you can read alert pin with a digital input trigger by this code