Libraries installation

Hi everyone,

I am quite new to using Arduino. Lately, I've been doing very simple projects in which i had to install some libraries. I always install them from Tools > Manage Libraries. The problem comes when I open a new Sketch and want to use these libraries (but in this newer sketch), I have to reinstall them. Is this behaviour correct? Do libraries get installed in the "local" sketch? Is there any way in which I can install a library so that any time I open a new sketch I have them already installed?

Many thanks in advance

No, you don't need it.
Just insert the #include directives for required libraries to the beginning of the sketch:

#include <AdafruitGfx.h>

void setup() {
}

void loop() {
}

No

Only if you do that very explicitly. How exactly did you install the libraries and what syntax are you using to #include them ?

For the libraries to be available to any sketch they should be installed in the libraries folder of your sketchbook folder (see File/Preferences in the IDE ).
Is that where they are ?

What is the full path to your sketchbook folder ?
Is it perhaps in a OneDrive folder ?

1 Like

Indeed it is a OneDrive folder, I didn't know about it and after checking, I realised. Thank you very much, I am gonna change it right now.

I don't know exactly what the problem is with OneDrive and the IDE, but I have seen problems reported on the forum many times

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.