I installed ads1015 Library and changed the folder name to "Adafruit_ADS1015"
and tried to compile the "singleended" example and I get thiese compiler errors:
C:\Program Files (x86)\arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=attiny85 -DF_CPU=1000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105
-IC:\Users\Robert\Documents\Arduino\hardware\tiny\cores\tiny -IC:\Program Files (x86)\arduino\libraries\Wire -IC:\Users\Robert\Documents\Arduino\libraries\Adafruit_ADS1015 C:\Users\Robert\AppData\Local\Temp\build1110814724047519314.tmp\comparator.cpp -o C:\Users\Robert\AppData\Local\Temp\build1110814724047519314.tmp\comparator.cpp.o
In file included from C:\Users\Robert\Documents\Arduino\hardware\tiny\cores\tiny/Stream.h:24,
from C:\Program Files (x86)\arduino\libraries\Wire/Wire.h:26,
from comparator.pde:1:
C:\Users\Robert\Documents\Arduino\hardware\tiny\cores\tiny/Print.h:37:1: warning: "BIN" redefined
In file included from c:/program files (x86)/arduino/hardware/tools/avr/lib/gcc/../../avr/include/avr/iotn85.h:38,
from c:/program files (x86)/arduino/hardware/tools/avr/lib/gcc/../../avr/include/avr/io.h:284,
from c:/program files (x86)/arduino/hardware/tools/avr/lib/gcc/../../avr/include/avr/pgmspace.h:82,
from C:\Users\Robert\Documents\Arduino\hardware\tiny\cores\tiny/Print.h:30,
from C:\Users\Robert\Documents\Arduino\hardware\tiny\cores\tiny/Stream.h:24,
from C:\Program Files (x86)\arduino\libraries\Wire/Wire.h:26,
from comparator.pde:1:
c:/program files (x86)/arduino/hardware/tools/avr/lib/gcc/../../avr/include/avr/iotnx5.h:55:1: warning: this is the location of the previous definition
In file included from comparator.pde:1:
C:\Program Files (x86)\arduino\libraries\Wire/Wire.h:61: error: conflicting return type specified for 'virtual size_t TwoWire::write(const uint8_t*, size_t)'
C:\Users\Robert\Documents\Arduino\hardware\tiny\cores\tiny/Print.h:75: error: overriding 'virtual void Print::write(const uint8_t*, size_t)'
I am using an UNO.
I tried again today and it compiled without errors. I don't know why it didn't compile before. I'll wait until I get my ADS115 chip and test it with that if it works with no problems I'll close the ticket on this issue.
From the error log you posted, it looks like you had your board type set for Trinket or Gemma. It's attempting to use the ATtiny runtime - notice all the references to "C:\Users\Robert\Documents\Arduino\hardware\tiny\cores\tiny"
I thought my ads1115 was working ok when I tested it by connecting all 4 inputs to a single pot and the readings followed the pot adustment but when I tried measuring different voltages on the four inputs I discovered that A1, A2 & A3 are just displaying whatever is connected to A0. if I separate them I cannot measure anything on A1, A2 & A3. because no matter what I have oonnected to them , the values reported for those imput simply mimic the value of A0. I don't know what to make of it.
I read in the datasheet that the four inputs are multiplexed based on the configuration in the config register. I didn't see any code in the example that writes to the config register. Do you have any example code to configure it for four independent inputs ? I thought that was what the attached file did. Please advise.
I need to configure it for three inputs for an analog acelerometer (adxl335) and right now that won't work because A1, A2, & A3 just report whatever the voltage is on A0.
I found the problem. I had not changed this:
// Adafruit_ADS1115 ads; /* Use this for the 16-bit version */
Adafruit_ADS1015 ads; /* Use thi for the 12-bit version */
TO THIS:
Adafruit_ADS1115 ads; /* Use this for the 16-bit version */ <=== I HAVE ADS115 AND IT WAS SETUP FOR ADS1015
// Adafruit_ADS1015 ads; /* Use thi for the 12-bit version */