Hello and thanks in advanced for any help!
I am testing out the Adafruit ads1115 for taking differential voltage readings. I am encountering an issue where I receive no readings, unless I disconnect either the SDA or SCL connections, causing the serial monitor to print:
"Raw ADC Value = 0 Voltage Measured = -0.000188"
There are two checkpoints I inserted (1 and 2). both print in the case the SDA and SCL are connected, but with no other output.
Does anybody see any glaring errors, or have familiarity with this use?
HARDWARE SETUP:
The A0 and A1 inputs of the ads1115 are connected to the Arduino's ground and 3.3 v (respectively). SDA and SCL are connected to the SDA and SCL ports of the Arduino, and Addr is grounded. The ads1115 is powered by 5 V. A photo is attached as well.
CODE:
#include <Adafruit_ADS1015.h>
#include <Wire.h>
Adafruit_ADS1115 ads1115(0x48);
Adafruit_ADS1115 ads1(0x49); // Down I have 0x49 (ADDR−5V) Adafruit_ADS1115 ads2(0x4B); // (ADDR−SCL) Adafruit_ADS1115 ads3(0x4A); // (ADDR−SDA)
int16_t results;
float scalefactor = 0.1875F;
float volts = 0.0;
void setup(void) {
ads1115.begin(); // Initialize ads1115 Serial.begin(9600);
Serial.println("checkpoint 1"); }
void loop(void) { int16_t results;
Serial.println("checkpoint 2");
results = ads1115.readADC_Differential_0_1(); volts = (results * scalefactor)/1000.0;
Serial.print("Raw ADC Value = "); Serial.print(results); Serial.print("\tVoltage Measured = "); Serial.println(volts,6); Serial.println();
delay(1000); }