Analog to Digital Converter

Hi,

I have ADS1115 from Adafruit.
It’s connected like this:

Few things have to change in raspi-config:

  1. disable device-tree (there propably is not need for this but could not figure out)
  2. enable i2c

In /boot/config.txt You should have:
dtparam=i2c0=on
dtparam=i2c1=on
dtparam=i2c_arm=on
dtparam=spi=on
device_tree=

Install wiringPi, i2c-tools, python-smbus

Check your ads1115 address with:
i2cdetect -y 1
(my is 48)

I have this little xojo app that displays volts from A0 from ads1115 (Do not put more than 5V). It is configured as AINP = AIN0 and AINN = GND and gain amplifier is ±4.096V and it uses address 0x48. You can change all this from code.

I don’t use Xojo GPIO module because I haven’t got time to test it but it looks like you can do this also with it.
This uses i2c-tools (i2cset and i2cget from shell). I don’t know whitc is more efficient?

Jukka