# Reading ADS1115 I2C ADC

**URL:** <https://forum.xod.io/t/reading-ads1115-i2c-adc/2252>\
**Category:** Uncategorized\
**Created:** [May 17, 2019, 11:46am UTC](https://forum.xod.io/t/reading-ads1115-i2c-adc/2252 "2019-05-17T11:46:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmwright](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/jmwright/32/1252_2.png) [@jmwright](https://forum.xod.io/u/jmwright)\
**Post date:** [May 17, 2019, 11:46am UTC](https://forum.xod.io/t/reading-ads1115-i2c-adc/2252/1 "2019-05-17T11:46:44Z")

</div>

I’m using an Arduino Nano to try to read an ADS1115 ADC. I am able to read the ADC fine from the Arduino IDE, but when I switch to my patch in XOD, it always reads the same value. I don’t get any errors. The Nano does use A4 and A5 for the SDA and SCL lines, and the I2C node in XOD says it only supports I2C interface #0. Not sure if there’s an issue there since the Nano doesn’t have dedicated lines like an Uno would. I followed the I2C guide [here](https://xod.io/docs/guide/i2c/) and the [datasheet for the 1115](http://www.ti.com/lit/ds/symlink/ads1115.pdf) is here. I’m still pretty new to XOD, so I’m not sure if I’m using the I2C nodes properly. Here’s my patch.

 ![Screenshot_2019-05-17_07-35-32](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/d/d85295882efc65af5a15b719e65229da862fe655.png)

---

<div class="post-metadata">

**Author:** ![jmwright](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/jmwright/32/1252_2.png) [@jmwright](https://forum.xod.io/u/jmwright)\
**Post date:** [May 17, 2019, 12:14pm UTC](https://forum.xod.io/t/reading-ads1115-i2c-adc/2252/2 "2019-05-17T12:14:43Z")

</div>

I forgot to mention that in the Arduino IDE I’m using the Adafruit library for the ADS1115. [https://github.com/adafruit/Adafruit\_ADS1X15](https://github.com/adafruit/Adafruit_ADS1X15)

---

<div class="post-metadata">

**Author:** ![nkrkv](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/nkrkv/32/8_2.png) [@nkrkv](https://forum.xod.io/u/nkrkv)\
**Post date:** [May 22, 2019, 8:38am UTC](https://forum.xod.io/t/reading-ads1115-i2c-adc/2252/3 "2019-05-22T08:38:54Z")

</div>

From the structural point of view, the patch is fine, it should work. I have no ADS1115 to test, unfortunately, but given what I see, I’m suspecting some small mistake in the values of those three bytes written at the beginning.
