Hardware Reference
In-Depth Information
There is also one other line that is required and that should be placed at the
very beginning of the i le:
#include "Arduino.h"
This imports the Arduino header i le, giving you access to Arduino constants
and types. It is automatically included for your sketches, but for libraries, you
must manually add this include statement.
All that is left to do is to import your new library. From the Arduino IDE, go
to Sketch
Import Library
Add Library, as shown in Figure 26-1.
Figure 26-1: Import a library.
Select the folder that contains your library, and import it. If everything goes
well, the Arduino IDE should tell you that the import has i nished. You can see
your library by navigating back to Sketch
Import Library where you see a
new library listed, as shown in Figure 26-2.
Now that the library has been imported, it is time to test it. Create a new
sketch, and add your library by going to the menu Sketches
Add Library
theAnswerToEverything . This should add the following line:
#include <theAnswerToEverything.h>
Search WWH ::




Custom Search