General recommendation

There are a lot of versions of libraries with the same name, that is the reason that a lot of example programs does not seem to work when you use it on your own computer.

What about my idea to give clearness of the used library in the sketches, such as:

#include <Adafruit_ADS1015.h> //From ADC1115 is 16 bits
#include <LiquidCrystal_I2C.h> //From

I think that it can solve a lot of frustration.

Might be better to link to the place from which the exact library can be downloaded. That would really avoid confusion.

I agree 1000% with the general idea of clearly documenting the library and version the sketch was written for. As someone who frequently needs to hunt down the right library just so I can do a quick compile of a sketch to provide support here on the forum before moving on to the next post, the lack of documentation of library dependencies of Arduino sketches is an eternal pet peeve of mine.

I also agree with groundFungus's recommendation though. Just the filename is not enough.

There is a feature of the Arduino IDE that is a little bit helpful for this sort of thing:
You can add specially formatted links that open a Library Manager search. However, that's only for the Arduino IDE and the search may return multiple results. So it's still important to provide the full documentation to allow anyone to find the dependency.

I also agree and use something like the following in the comments section of my sketches.

* Libraries
* - Arduino_LSM6DS3 (
*   - Interacts with the on-board Inertial Measurement Unit (IMU).
* - SPI Standard Library (
*   - Interacts with the microcontroller's Serial Peripheral Interface (SPI)
*     port(s).
*   - Required for use with the WiFiNINA library.
* - WiFiNINA (
*   - Interacts with the on-board WiFi module.

I think that it can solve a lot of frustration.

A much simpler solution would be for the library developers to take 30 seconds of thinking time and give their library a unique name.


Fortunately, the Arduino Library Manager requires each library to have a unique name, though it doesn't require all the files in the library to have unique names, so the library name still needs to be documented.

Library Manager is getting closer all the time to being a comprehensive source of Arduino libraries, but there will always be some libraries that weren't added. So you still end up resorting to Google to find a library and install it manually.

The way GitHub (and likely the alternatives as well) works leads to many libraries of the same name. There is this "fork" mechanism, where you create a copy of a repository under your own account. Forks may be made for a few different reasons:

  • You have decided to make your own version of the project (often done when you know the maintainer of the parent repository won't accept the changes you want to make). I call this a "hard fork".
  • You want to propose a change to the parent repository. The way this is done is you create a fork, make the change in your fork, then submit the pull request to the parent repository for the change from your fork. I currently have >1600 of this type of fork repository under my account, all waiting on the pull request to be merged in the parent repository before I can delete them.
  • You want to make a backup of the project. This could be done either because you are afraid the parent repository will be deleted or because you want a copy that can't be modified by anyone else.

In the first case ("hard fork"), the project should definitely be renamed.

In the latter two cases, it doesn't make sense (and actually would be harmful) to rename. GitHub does add a link to the parent repository of the fork, but a beginner isn't necessarily going to see that link when they find a fork on Google. Another huge problem is that if the parent repository is deleted that fork link is lost, so every fork of the repository becomes a copy, with no clear indication that it isn't a unique project. I regularly go through my repositories to delete these, but many people wouldn't bother to clean up their account.

Fortunately, the Arduino Library Manager requires each library to have a unique name,

The case that particularly irritates me is the RF24 library for the nRF24 transceiver modules.

The original (?) version was created by maniacbug and subsequently an improved version was released by TMRh20 but he did not think to give his version a different name. Consequently a user can easily be confused about which version is installed in the IDE. It would have been so easy, and so sensible, to have given the modified version a unique name.

And what about the person who needs both versions for two different projects?