[Solved]Adafruit ADS1115 Read Voltage Divider

Hello,

First time posting. I'm simply trying to read a voltage divider using the single ended mode. I have a Arduino Pro Mini. The connections are:

Arduino to ADS1115:
A4 --> SDA
A5 --> SCL

ADS1115 Connections:
VDD --> 5V
GND --> GND
A0 --> Voltage divider

The code is right from the Adafruit site. I only changed a few applicable labels from ads1015 to ads1115. The code uploads and the serial monitor gives me:

Hello!
Getting single-ended readings from AIN0..3
ADC Range: +/- 6.144V (1 bit = 188uV)
AIN0: -1
AIN1: -1
AIN2: -1
AIN3: -1

AIN0: -1
AIN1: -1
AIN2: -1
AIN3: -1

AIN0: -1
AIN1: -1
AIN2: -1
AIN3: -1

It just keeps reporting -1 for all four channels! The code is:

#include <Wire.h>
#include <Adafruit_ADS1015.h>

Adafruit_ADS1115 ads1115;

void setup(void)
{
  Serial.begin(9600);
  Serial.println("Hello!");
  
  Serial.println("Getting single-ended readings from AIN0..3");
  Serial.println("ADC Range: +/- 6.144V (1 bit = 188uV)");
  ads1115.begin();
}

void loop(void)
{
  int16_t adc0, adc1, adc2, adc3;

  adc0 = ads1115.readADC_SingleEnded(0);
  adc1 = ads1115.readADC_SingleEnded(1);
  adc2 = ads1115.readADC_SingleEnded(2);
  adc3 = ads1115.readADC_SingleEnded(3);
  Serial.print("AIN0: "); Serial.println(adc0);
  Serial.print("AIN1: "); Serial.println(adc1);
  Serial.print("AIN2: "); Serial.println(adc2);
  Serial.print("AIN3: "); Serial.println(adc3);
  Serial.println(" ");
  
  delay(1000);
}

In the attached image, the ads1115 is covering my VDD, GND, and ADDR connections but they're there.

Can someone please help?!

Thanks

Double Check where A4 and A5 really are located in your Arduino Pro Mini.

Hello,

I double checked the A4, A5 connections and they look correct.

Solved!

For the Pro Mini the SDA should be connected to analog pin A4 and SCL to A5. These are not located on the side of the board. But the holes should be marked with A4,A5 on the underside of it.

1Bryan:
Hello,
I double checked the A4, A5 connections and they look correct.

:o :o :o

1Bryan:
Solved!

For the Pro Mini the SDA should be connected to analog pin A4 and SCL to A5. These are not located on the side of the board. But the holes should be marked with A4,A5 on the underside of it.

yes you had connected to digital 4 and 5... :grin: :grin: :grin: