By domain
#42621
Hi, it may be that the documentation on DFR wiki site is out of date for the ADS1115 module.

First the command "git clone <https://github.com/DFRobot/DFRobot_ADS1115.git>" causes an error. Removing '<' and '>' resolves this.

Following the instructions leads to the following error trace when running the read voltage module:
Traceback (most recent call last):
File "/home/pi/DFRobot_ADS1115/RaspberryPi/Python/ADS1115_ReadVoltage/ADS1115_ReadVoltage.py", line 19, in <module>
adc0 = ads1115.readVoltage(0)
File "../DFRobot_ADS1115.py", line 142, in readVoltage
self.setSingle()
File "../DFRobot_ADS1115.py", line 110, in setSingle
bus.write_i2c_block_data(addr_G, ADS1115_REG_POINTER_CONFIG, CONFIG_REG)
OSError: [Errno 121] Remote I/O error

Running the .py file in Thonny gives the same error trace.


It may be I hooked up something incorrectly to I2C or even the sensor that draws a few mA powered via the pins on the ADS back to the Pi; but I have checked and rechecked and it maps to the correct pins between ADS1115 and RPi, and between sensor and ADS1115.

Any ideas as to why it is not working?
Thank you in advance if this and any further issues can be resolved.
By nana.wang
#42626
Hi thank you for your support and contact.
We have tested it, below is the details.
1. You need to check whether your Raspberry Pi IIC interface is enabled.
2. If your IIC interface is enabled, you need to check whether the IIC address of ADS1115 matches the address in the code (there is a switch on the ADS1115 that can change its IIC address).