Arduino Library Management

Started by baxterdavid, April 04, 2014, 01:08:44 PM

baxterdavid

I'm trying to find a more efficient approach / workflow for managing Arduino libraries. I use the Arduino IDE for Arduino development along with Git Hub for source code management. However, I find it challenging to manage Arduino libraries in the following situations:

1) Since the library directory isn't part of the project directory, I can't add libraries the the same source code repo. When working on a project on multiple computers, it makes it challenging to keep libraries and library versions in sync.

2) Since the library directory isn't part of the project directory, I also can't add Git Hub hosted libraries as submodules to easily keep track of library changes.

I appreciate any tips and suggestions. I looked for other posts in the forums, but didn't find anything. Feel free to point me towards an existing forum post or other site if this has already been discussed.

dparson

I had the same issue managing libraries across multiple computers but solved it by using a cloud drive (Dropbox, Google Drive, Amazon Cloud Drive, etc) and using the Arduino Sketchbook location feature.  Here is an example:


  • Install Dropbox and set the folder to be C:\Dropbox on each of your computers.
  • Create folder C:\Dropbox\Arduino.
  • Create folder C:\Dropbox\Arduino\libraries.
  • Move the RFM69 library folder into C:\Dropbox\Arduino\libraries.
  • Within the Arduino IDE on all your computers, go to the File > Preferences menu and update the Sketchbook location to be C:\Dropbox\Arduino.

Once this is done the Arduino IDE will look for libraries in its normal spot (the libraries folder where the arduino.exe is located) along with the libraries folder in the dropbox folder.  So this is another feature of the Sketchbook setting in the Arduino IDE, it allows you to include libraries (and other folders like the hardware folder) in a second location.

I learned about this feature of the Arduino IDE when learning to add support for the ATtiny85 microcontroller to the Arduino IDE.  The instructions for installation of the ATtiny hardware profiles talked about how the Sketchbook location had this feature. (https://code.google.com/p/arduino-tiny).

If you use Atmel Studio and the excellent Visual Micro extension, it works exactly the same.

Hope this helps, good luck!