bakami 0 Posted November 14, 2021 Hey, i'm trying to follow this Guide for a 3rd party module i try to use, which was made for a raspberry pi, but when i try to execute the second script, this error message appears: $ sudo python ADS1115_ReadVoltage.py Traceback (most recent call last): File "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) IOError: [Errno 6] No such device or address I used this program to activate my I2C-1 port: https://tinkerboarding.co.uk/forum/thread-400.html ,i couldn't find another way. "$ sudo i2cdetect -y 1" returns that it found a device on 0x49, as expected, so it should be activated. The main script seems to use this code to get the bus: import smbus import time # Get I2C bus bus = smbus.SMBus(1) # I2C address of the device ADS1115_IIC_ADDRESS0 = 0x48 ADS1115_IIC_ADDRESS1 = 0x49 I attached the whole module folder, the scripts are under /DFRobot_ADS1115/RaspberryPi/Python/DFRobot-ADS1115.py and /DFRobot_ADS1115/RaspberryPi/Python/ADS1115_ReadVoltage/ADS1115_ReadVoltage.py Thanks for any tips for how to make this work. DFRobot_ADS1115.zip Share this post Link to post Share on other sites
bakami 0 Posted November 14, 2021 Ah nvm, i found the error, somehow the script only works if the onboard switch is set to adress 0x48 instead of 0x49 Share this post Link to post Share on other sites
yi-hsin_hung 3 Posted June 1, 2022 Hi @bakami: Maybe you can check the contents of slave address 0x49 device by the following command to dump information. Thank a lot! sudo i2cdump -y 1 0x49 Share this post Link to post Share on other sites