4 Replies Latest reply on Sep 6, 2017 12:15 PM by GCay

    Programming ADS 1115 with Intel Edison Breakout Board

    GCay

      Hi,

       

      I am trying to program ADS 1115 Analog to Digital Converter with Intel Edison Breakout Board. I made the connections like this:

       

      ADS SCL - Edison SCL (J18-6 or J17-7)

      ADS SDA - Edison SDA (J17-8 or J17-9)

       

      and I am trying to measure 3.3V from A0.

       

      It is working with Edison Arduino board and shows 3.3V in serial monitor but when I connect to Breaout Board, A0 pin shows -1 constantly. How can I solve this?

       

      Here is the code:

       

      #include <Wire.h>

      #include <Adafruit_ADS1015.h>

       

      Adafruit_ADS1115 ads(0x48);

      float Voltage = 0.0;

       

      void setup(void)

      {

        Serial.begin(9600); 

        ads.begin();

      }

       

      void loop(void)

      {

        int16_t adc0;  // we read from the ADC, we have a sixteen bit integer as a result

       

        adc0 = ads.readADC_SingleEnded(0);

        Voltage = (adc0 * 0.1875)/1000;

       

        Serial.print("AIN0: ");

        Serial.print(adc0);

        Serial.print("\tVoltage: ");

        Serial.println(Voltage, 7); 

        Serial.println();

       

        delay(1000);

      }

       

      Thanks in advance!