Arduino Library Config

In this page you will undersand how to configure a Library into the arduino framework

If you need additional specific information about this topic or if you want to look it personally please write an email

In this, quick, tutorial I will assume you use the standard arduino framework configured in the .\Arduino folder of your computer.
Using the standard framework you can configure the position of the folder used to build your sketches.
in order to validate the position of your sketch folder you can open the preference menu of your Arduino configuration:

The sketch folder is the folder which should contain your libraries. In this folder you need to have another folder called: 'Libraries' and in it you need to copy (or create) all your libraries.

If, for example you want to install the Adafruit Library SSD1306 used to run an OLED display with Arduino, download the zip file from our Download Area and unzip the content in a generic folder.
You will see that the folder name has the following aspect:

adafruit library unzipped

One of the main caractheristics of Arduino naming convention is that the folder name must be equal to the name of the sketch or to the name of the library you are using. So, in this case, we have a first problem.
In fact the name of the folder is:


but the name of the header file or the name of the Cpp file is different. The library is, in fact, named:

Adafruit_SSD1306 (.h or .cpp)

For this reason under the Library folder you will need to create a folder named: 'Adafruit_SSD1306' and copy the source files in it.
That's all. Now every time you want to use the library you have two option:

1) Manually include the library into the header section of your sketch:

                #include "Adafruit_SSD1306.h"
2) Including it using the framwork option: 'import library'

Import Library function

You will see that this function does nothing more than include the right header file in your sketch in order to use functions included in the bin or C library files.

Leave a Comment