Hi guys, I need some help to make this ADC from adafruit to work on Due using the SDA1 and SCL1 lines.
Well, I think I have fried the SDA and SCL line in my Due, because I could test the same adafruit with a UNO board and it worked.
As I know there is the SDA1 and SCL1 on the DUE board I am trying to use them. The first problem is that I dont know what I have change in the code. Can someone take a look on it and check if I miss something ?
#include <Wire.h>
#include <Adafruit_ADS1015.h>
//#include <Adafruit_MCP4725.h>
//extern TwoWire Wire1;
Adafruit_ADS1115 ads1115;
double adV0,Vout0;
void setup(void) {
//Wire1.begin();
Serial.begin(9600);
ads1115.setGain(GAIN_ONE);
ads1115.begin();
}
void loop() {
int16_t adc0;
adc0 = ads1115.readADC_SingleEnded(0);
Serial.print("Value AIN0: "); Serial.println(adc0,4);
adV0 = adc0*0.000125;
Serial.print("Voltage AIN0: "); Serial.println(adV0,4);
Serial.println("-------------------");
delay(3000);
}