Today, we will rather have a short tutorial on how to add or install Arduino libraries instead of the usual sensor-Arduino interfacing. Importing or installing a library is a very usual thing to do if you are someone who is into robotics or perhaps just an enthusiast who is into electronics and keeps inventing or experimenting every now and then.
To put in layman terms, libraries are add-ons, plugins, mods, upgrades etc. which enable you to interface the sensors with extremely fewer lines of code and makes your job easy by significantly reducing time and efforts.
Enough of that now. Let’s get started
Do not forget to watch the VIDEO TUTORIAL at the end! 😉
2 ways to install Arduino libraries are –
Method 1 – By directly adding .zip file
1.Get the library you would like to add to Arduino.
2. For example – I did a tutorial on How to operate LEDs via TV Remote a while back. The code used an IRremote library. For that, search “IRremote library” on Google & you would get an Arduino or GitHub link for downloading it. Here’s the GitHub link for IRremote library.
3. Download the .zip file and keep it as it as. DO NOT extract it.
4. Go to Arduino > Sketch > Include Library > Add .ZIP Library.. and select the .zip file you just downloaded.
5. That’s it. The library has been added and you could also find the examples included in the IRremote library by going to File > Examples > IRremote.
Method 2 – Using Arduino Library Manager
Another way to install a library is to directly get it from the Arduino application itself through its library manager. For that,
1.Open the Arduino application
2. Go to Tools > Manage Libraries
3. On the top right corner, enter the library name into the search bar you would like to download. For eg. In our case, lets search for IRremote.
4. Once you find it, Click on Install & there you go, you have installed your library.
Simple, right?
Yea, that was it! No more of those orangish-red Arduino error messages!
Hope you found it helpful. Comment down below if you face any issues. I’ll get to them ASAP 😉