-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?

dankeboy36
  • 80
  • 4
raddevus
  • 382
  • 2
  • 14
  • 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 – Juraj Jan 09 '23 at 10:17

1 Answers1

-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

raddevus
  • 382
  • 2
  • 14
  • 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. – timemage Jan 09 '23 at 03: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 – raddevus Jan 12 '23 at 14:58
  • 2
    do you see the location of the sketchbook folder in the Preferences dialog? then read my comment again and slow – Juraj Jan 12 '23 at 16:27