Can't find Adafruit_ADS1015.h

Hi, I’m new here so please be gentle.

I’ve just installed PlatformIO for Visual Studio and am trying to compile my first little test project but keep coming up with the same errror.

Compiling .pio/build/huzzah/libaf6/SensESP/sensors/ads1x15.cpp.o
In file included from .pio/libdeps/huzzah/SensESP/src/sensors/ads1x15.cpp:1:0:
.pio/libdeps/huzzah/SensESP/src/sensors/ads1x15.h:4:30: fatal error: Adafruit_ADS1015.h: No such file or directory

I have tried installing the missing library via git and also by copying the .cpp and .h files into various locations but can’t seem able to fix it so any help would be much appreciated.

I’m more of a python programmer these days. My exposure to anything ‘C’ related was out of the Kernigan & Ritchie book about 40 years ago!

Remove those files again and add to the platformio.ini

lib_deps = 
   adafruit/Adafruit ADS1X15 @ ^1.1.2

(docs).

the files seem to be there from GitHub - adafruit/Adafruit_ADS1X15 at 1.1.2, but they are renamed to Adafruit_ADS1X15.h in the latest dev branch, so care must be taken if wanting to use the new 2.0.1 release that was released 6 days ago.

Library page is per PlatformIO Registry but since the header file is renamed it only shows the ADX1X15.h file, not the one from the previous version.

Thanks for that. I’ve done as you suggested but it is now complaining about Adafruit_I2CDevice.h now.

/Users/Adrian/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/Adafruit_ADS1X15.h:19:32: fatal error: Adafruit_I2CDevice.h: No such file or directory

I have added Adafruit BusIO to the project as the library manager in the Visual Studio PlatformIO IDE indicated but did not make any difference.

What does the platformio.ini of the project look like?

lib_deps =
   adafruit/Adafruit ADS1X15 @ ^1.1.2
   adafruit/Adafruit BusIO @ ^1.7.2

is at the bottom to declare both libraries?

Hi Max

Thanks for helping out. This is the contents of the platformio.ini

[platformio]
default_envs =
huzzah

[env]
framework = arduino
lib_ldf_mode = deep
monitor_speed = 115200
lib_deps =
SignalK/SensESP

[espressif8266_base]
platform = espressif8266
board_build.ldscript = eagle.flash.4m1m.ld
build_flags =
-Wall
-Wno-reorder

[env:huzzah]
platform = espressif8266
board = huzzah
framework = arduino

lib_deps =
adafruit/Adafruit ADS1X15 @ ^1.1.2
adafruit/Adafruit BusIO @ ^1.7.2

Not too sure if it’s correct though.

Hi Max. I’ve managed to sort it out. Problem was due to having extra copies of the Adafruit_ADS1X15.cpp & .h files in places they shouldn’t have been. All compiled and uploaded to my esp8266. Need to see if it works now.