I am new to Arduino and I am trying one of the library TimedAction.h for sudo multithreading on Arduino. However the library is not present in the Arduino. How do I install external library(if it is)?
1 Answer
You can use three ways to install libraries in the Arduino IDE:
The probably easiest way is to go to Sketch > Include Library > Manage Libraries, (you can use Ctrl+Shift+I too) search for the library you want to install and click the install button. After that you need to include the library in your sketch with a #include <LibraryName.h>
, or if you don't know the name, head again to Sketch > Include Library and click on the library you want to include.
If a library is not in the Library Manager from step one, you have to download the .zip
file, go to Sketch > Include Library > Add .ZIP Library and search for the file. You just have to do that once, and it will be moved to your library folder. Again, make sure to include the library into the sketch.
If you just have a single file, you can move it to the sketch folder and include it by using #include "LibraryName.h"
, but you have to do it all over again for a new sketch, so I would recommend the other solutions if you can and want to use it permanently.