new ways to manage Arduino libraries

Hi there,

We’ve built a new tool in biicode to solve the library management problems in Arduino.

Currently; when you start a new Arduino project that uses new hardware, the first thing you have to do is to look for 3rd-party libraries that bring Arduino support for that hardware.

Once you have found the libraries you need, You have to download it to your Arduino libraries folder, use it and probably forget it.

This process cumbersome:

  • manual search with different possible options, not always well documented

  • manual download and install to Arduino libraries

  • no version control in the process (all versions of a library have the same name and thus cannot coexist in the Arduino library folder).

The tool I’m working on proposes a central repository for arduino libraries and an automated way of retrieving them, configuring them into your project and flashing the whole thing into the board. It is called biicode. In this video you can see how easy is to get and integrate a bunch of adafruit libraries:

https://asciinema.org/a/8324

It’s still a beta. It’s features are the following:

  • Dependencies resolution, transitively, as maven does for java, but without config files: directly from source code

  • Central repository, anyone can upload their libraries. They can be explored, navigated and discovered in web

  • Version control: it checks versions compatibility and allows safe updates of dependencies (but is not a version control system as github is, I suggest using both together)

  • You can use it with any text editor (it has optional eclipse support)

  • It manages project setup and compilations, flashes generated firmware to the board

  • It has a nice serial monitor as a plus

  • Available for windows, linux and mac

  • Anyone can upload any library or code with a simple publish command

Please give it a try and/or tell me what do you think :stuck_out_tongue:

amalulla:
Hi there,

[snip]

Once you have found the libraries you need, You have to download it to your Arduino libraries folder, use it and probably forget it.

This process cumbersome:

  • manual search with different possible options, not always well documented

  • manual download and install to Arduino libraries

  • no version control in the process (all versions of a library have the same name and thus cannot coexist in the Arduino library folder).

The tool I’m working on proposes a central repository for arduino libraries and an automated way of retrieving them, configuring them into your project and flashing the whole thing into the board.
[/quote]

Hi,
I was about to ask for something like this, but would like to know if something simpler could be arranged: allow users to add a suffix to library directory names so that versions and modifications can be identified. This would require Arduino to have some kind of compilation directive.

One specific case is the brilliant MIDI library. You're invited to change some things in a header file, and the only way I've found to indicate I've done that is to add a readme file with a suitable name. Also, the new version 4 has additional functionality. When I need that, I'd like to be able to rename the MIDI library something like MIDI_V4_AutoOff - the suffix indicates the version number followed by the setting of a directive.

I guess the difference with respect to professional programming is that we amateurs don't often use versioning tools.

The problem when adding a suffix is that the code you write is no longer valid for updates and upgrades and have to be modified.
For example if you have MIDI_V1 and someone is using it: "#include MIDI_V1/MIDI.h", whenever you update it, they have to change it too: "#include MIDI_V2/MIDI.h"

With biicode that problem is solved, it automatically retrieves the last version by default, but you can configure the one you want to use. Anyway, if you want to name them different there is no trouble at all. Just do whatever you think it's more useful for you and biicode configures and sets everything up.

So, if you have two different versions of the same named library: one of them has AutoOff and the other one has AutoOn, you can use the one you need just by their version (being that in the name or in the config).

Hope it's helpfull!

The whole point of library in arduino is to bring in all talents from all over to make arduino more useful. There is not a single person or entity managing all the spontaneous library developers and their versions. Only the most popular ones are kept current by the developers that have time for them. You can't force every developer to report to a single entity for their uploads. What if this repository breaks down? Your idea is good but not realistic for arduino. A better way is to encourage developers to post introductions of their libraries on an arduino team hosted website but still keep library sources distributed.

Hi liudr,

We totally agree that the best approach is to have the libraries and source code distributed, and biicode does not attempt to be a "unique" repository. In fact we implement some git support and recommend to use a full CVS along with biicode for development. Also, having your code hosted in a site, does not exclude you from writing introductory posts in other sites; having an arduino team managed website would be great.

But, if in addition to have the code in any other place, you put the code in biicode, it will make it easier for end users to retrieve and use it. Take into account that biicode manages transitive dependencies. As you can see in the video, if you require library A, and A in turn requires libraries B and C, by #including A, all three A, B & C are retrieved. This cannot be easily managed with regular zip downloads or repo clones.

About the site reliability, even major providers fail from time to time, e.g. a few days ago Github had a couple of hours downtime.

If you have any other concern, please let me know, we greatly appreciate all feedback.

Cheers

liudr:
The whole point of library in arduino is to bring in all talents from all over to make arduino more useful. There is not a single person or entity managing all the spontaneous library developers and their versions. Only the most popular ones are kept current by the developers that have time for them. You can't force every developer to report to a single entity for their uploads. What if this repository breaks down? Your idea is good but not realistic for arduino. A better way is to encourage developers to post introductions of their libraries on an arduino team hosted website but still keep library sources distributed.

CPAN, PECL, RubyGems do this, all of them quite well and for a long time. It's a challenge but I wouldn't call it unrealistic.