Maker Pro
Maker Pro

Including libraries

bigone5500

Apr 9, 2014
712
Joined
Apr 9, 2014
Messages
712
A sketch I found says to include this library:
Code:
#include <FrequencyTimer2.h>

Are these stored on the controller? How are these 'included'?
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
.h files (header files) are stored in a specific folder on your hard drive. Read the development system documentation to find where they're kept, and make sure that one is there. If it's not a standard part of the development system, you may need to download and include it.

The header file tells the compiler about the functions provided in the associated library module, but it does not contain the actual code. You may also have to tell the toolchain where to find this code, in the form of an object file (sometimes with the .obj extension), so it can be linked in with your own source code to form a binary image file that can be downloaded to the controller and includes all the required code.
 

ketanrd01

Aug 11, 2014
74
Joined
Aug 11, 2014
Messages
74
Yep,true.
Some times the libraries are present and some times you may have to download them.....
 

Colin Mitchell

Aug 31, 2014
1,416
Joined
Aug 31, 2014
Messages
1,416
These files normally have to be placed in the same folder as your program or your programmer.
 

JoeM

Sep 5, 2014
33
Joined
Sep 5, 2014
Messages
33
http://playground.arduino.cc/Code/FrequencyTimer2
It's a common practice for someone to post the path to the library download with their program.

Adafruit had it, and I gave you a link to it.

Will your next question be "How do I add a library to my programming environment" ?

That can also be found at Adafruit. Check out Github too.
 
Top