Hi all, hope I haven't posted in the wrong forum.
I'm trying to read in data from an Adafruit 16-bit ADC w/ Amplifier (www.adafru.it/1085) and, more specifically, trying to follow the tutorial here: Arduino Code | Adafruit 4-Channel ADC Breakouts | Adafruit Learning System
I'm using this with an UNO.
Code:
#include <Wire.h>
#include "Adafruit_ADS1015.h"
Adafruit_ADS1115 ads1115(0x48); // construct an ads1115 at address 0x48
void setup(void)
{
Serial.begin(9600);
ads1115.begin(); // Initialize ads1115
}
void loop()
{
int voltage_diff_0_1 = 0;
int16_t adc0, adc1, adc2, adc3, differential_adc0_1;
int16_t results;
results = ads1115.readADC_Differential_0_1();
//adc0 = ads1115.readADC_SingleEnded(0);
//adc1 = ads1115.readADC_SingleEnded(1);
//adc2 = ads1115.readADC_SingleEnded(2);
//adc3 = ads1115.readADC_SingleEnded(3);
//differential_adc0_1 = ads1115.readADC_Differential_0_1(void);
//float adc1_voltage = (adc1 * 5.0) / 32768;
voltage_diff_0_1 = 4.94 - differential_adc0_1;
Serial.print("Assuming AREF == 4.94V. Diff from ADC1: ");Serial.println(voltage_diff_0_1);
Serial.print("ADC1 reading was: ");Serial.println(differential_adc0_1);
delay(1000);
}
When I try and compile this (basically copy/pasted from the tutorial) it throws the following error during linking:
Arduino: 1.8.3 (Windows 7), Board: "Arduino/Genuino Uno"
C:\Users\jaceved2.NDC\AppData\Local\Temp\1\ccZ2wcVs.ltrans0.ltrans.o: In function `loop':
C:\Users\jaceved2.NDC\Documents\Arduino\bigdipper_arduino_v0/bigdipper_arduino_v0.ino:28: undefined reference to `Adafruit_ADS1115::readADC_Differential_0_1()'
collect2.exe: error: ld returned 1 exit status
exit status 1
As far as I can tell everything is mimicked from the example, and the daughterboard is working fine (I was able to read in the single-ended conversions without issue.) Any ideas? Thanks!