Install GitHub libraries on Arduino IDE

Posted on by


If you’ve ever been looking for Arduino libraries sure you finished in GitHub. This web repository has thousands of libraries that can be very useful for our projects with Arduino. Let’s see a couple of ways to install a library that is hosted on GitHub. For this example I chose the aJson library.
In the first place we will see how a manual installation would be done, for which we need to download the library in a ZIP clicking the Download ZIP button inside the project page.

library download ZIP file button of GitHub.

library download ZIP file button of GitHub.

Once downloaded if we try to add the library using the drop-down menu Import Sketch >> Library   >> Add Library   It will give an error because Arduino IDE supports only ASCII characters in file names of libraries and Github added  a master at the end of the name, both ZIP and the project folder. The problem is that the ‘-‘ character not supported . Therefore we have to extract the ZIP by hand in the libraries folder of your sketchbook (in Ubuntu is in the user home, in ~/sketchbook/libraries/). Once extracted we need to rename the folder by removing all non-ASCII characters, in most cases just remove the -master” final and it will be ready to use. When we return to open Arduino IDE and library will be available in our sketchbook.

Another way to install the library is by git. If you have not yet installed what you can do it using the Ubuntu Software Center or using the following command Instruction:

sudo apt-get install git
URL para hacer clone de un proyecto en git.

URL to clone a GitHub project.

If you already have git, to install the library just open a terminal, go to ~/sketchbook/libraries/ folder and make a clone of the URL of the project, you can find just above the  download ZIP button.

cd ~/sketchbook/libraries/ 
git clone

This time there will not be necessary to rename anything because GitHub not change the name of the project folder as in the case of by hand installation ZIP. In short library already be installed and we should see it opening Arduino IDE sketchbook.


Comments are disabled