Reading ADS1115 I2C ADC

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 and the datasheet for the 1115 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.

I forgot to mention that in the Arduino IDE I’m using the Adafruit library for the ADS1115.

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.

1 Like