1

Just installed Arduino 2.0.3 and I attempted to build a sketch which includes a library that I manually installed in version 1.8.19 and it can't be found:

In my program I have #include <DS3231.h>

Now, attempting to compile it cannot find the library.

What is the path to the basic libraries in Arduino 2.0.3?

asked Jan 8, 2023 at 23:31
1
  • 1
    as in IDE1, it is the libraries folder in the sketchbook folder. the location of the sketchbook folder is in the Preferences dialog in the IDE Commented Jan 9, 2023 at 10:17

1 Answer 1

1

I found the location by examining the app while it was running.

The associated libraries are at:

%localappdata%\arduino15\Libraries

That will look like : C:\Users\<username>\AppData\Local\Arduino15\libraries

I created a new folder named DS3231 dropped in the .cpp, .h and .config files and now my sketch compiles with the #include <DS3231.h>

Kind of blows my mind that the Arduino 2.0.3 Libraries are found in a directory named Arduino15. Is that an old version or something?

Here's what I see in preferences -- don't see a location for user libraries:

arduino preferences

The best location will be your sketchbook location + a folder named libraries.

For example, in my case my sketchbook location is :

c:\users\<username>\dev\arduino

so my library folder should be:

c:\users\<username>\dev\arduino\libraries

answered Jan 8, 2023 at 23:35
3
  • 1
    "in a directory named Arduino15. Is that an old version or something?" The 15 comes from the the 1.5.x series IDE which first introduced support for boards other than the original set of AVR boards, was carried into arduino-builder, and arduino-cli were it remains relevant to current day IDEs. It is not a normal place to add user libraries. Commented Jan 9, 2023 at 3:49
  • @timemage Where would the place be to add user libraries? I've added an image to the answer showing the Arduino 2.0.3 preferences but I don't see any location that would work. Do you have an alternative path in mind that works for 2.0.3? Thanks Commented Jan 12, 2023 at 14:58
  • 2
    do you see the location of the sketchbook folder in the Preferences dialog? then read my comment again and slow Commented Jan 12, 2023 at 16:27

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.