Jump to content

bakami

Members
  • Content Count

    2
  • Joined

  • Last visited

Posts posted by bakami


  1. 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

×
×
  • Create New...