ESP32 ADS1015 No such file or directory

OK, great. I can see from the tutorial that they were using version 1.0.0 of the "Adafruit ADS1X15" library. There was a breaking change to the library since then, which is the cause of the error.

The easiest fix is to use the old version of the library. Even though the tutorial author wrote the sketch for 1.0.0 of the library, you should be able to use up to version 1.1.2, which was the last release before the bump to 2.0.0 (the major version bump is used to indicate a breaking change).
Please try this:

  1. Select Sketch > Include Library > Manage Libraries... from the Arduino IDE's menus.
  2. Wait for the update to finish.
  3. In the "Filter your search" field, type "Adafruit ADS1X15".
  4. Press Enter.
  5. Scroll down through the list of libraries until you see the "Adafruit ADS1X15" library. Click on it.
  6. From the dropdown version menu, select "1.1.2".
  7. Click the Update button.
  8. Wait for the installation to finish.
  9. Click the Close button.

Now try compiling the sketch again.

1 Like