I2C OSerrors: 5, 116, 16 problem with interfacing to ADS1115
Posted: Fri Jul 03, 2015 7:19 pm
Hey there,
So I've read all the posts on this forum regarding I2C and OSerrors:5, 116 and 16 with no real insight into why I might be experiencing the issues I am.
Basically, I'll usually be able to write to the ADC with something like:
i2c.mem_write(data, address, config_reg, addr_size=16)
and no exceptions will be thrown. Then, when I try to read a conversion via:
i2c.mem_read(2 , address, convert_reg, addr_size=16)
I'll get an OSError: 5, followed by 116's to infinity (should I try the same operation repeatedly).
I have also tried to use i2c.send(data, address) and i2c.recv(data, address) to accomplish what mem_write/mem_read would do, and in this case I get OSerror: 16 where the ADC or i2c bus stop communication and
i2c.scan() returns : []
So my question is:
Am I missing something in the I2C functions themselves, or is this likely pilot error on my part with not understanding something about my ADC chip (it seems really straight forward). Anyhoo...thanks in advance for any responses
So I've read all the posts on this forum regarding I2C and OSerrors:5, 116 and 16 with no real insight into why I might be experiencing the issues I am.
Basically, I'll usually be able to write to the ADC with something like:
i2c.mem_write(data, address, config_reg, addr_size=16)
and no exceptions will be thrown. Then, when I try to read a conversion via:
i2c.mem_read(2 , address, convert_reg, addr_size=16)
I'll get an OSError: 5, followed by 116's to infinity (should I try the same operation repeatedly).
I have also tried to use i2c.send(data, address) and i2c.recv(data, address) to accomplish what mem_write/mem_read would do, and in this case I get OSerror: 16 where the ADC or i2c bus stop communication and
i2c.scan() returns : []
So my question is:
Am I missing something in the I2C functions themselves, or is this likely pilot error on my part with not understanding something about my ADC chip (it seems really straight forward). Anyhoo...thanks in advance for any responses
