If memory serves me correct, when duplicate name libraries are encountered, the first one found will be used. This is the main reason you should specify the library by ID - as then regardless of name(or name changes) only the specified library will match.
I use the following syntax, as PIO will ignore semi-colon comments:
I’m not talking about lib_deps configuration as I can just give the zip location from github. I’m talking about the bug in the library installer which is not case sensitive I suppose. It should install libs by its ID not lib’s name
You are necro-posting in a 2 year old topic. The information here is outdated.
Library IDs are the internal IDs within the PlatformIO library registry, looking into the the libraries files in your local Arduino IDE installation will not help. You need to find the library in the registry. Clicking on one lib will then show in the URL the ID, e.g. https://platformio.org/lib/show/64/ArduinoJson, ID 64 is ArduinoJSON.
However, you should not be using library IDs in the current day and age. You should always be following the official documentation, e.g. regarding the library manager. There it will tell you that you refer to a library, which is in the PlatformIO registry system, with their uploader username, library name and version (as SemVer expression).
PlatformIO again shows you this on every library install page, e.g. with the above referenced ArduinoJson
Sorry about the old topic business. That is the one that came up when I did my search.
I am just getting my feet wet with PIO, so most of what you said was way above my pay-grade.
I have an Arduino project that is working fine in that IDE. It uses LiquidCrystal_I2C.h library and DHT_U.h.
When I try to install the libraries in PIO, there are several with the same name. I have tried them all, but being a new PIO user, I probably did something wrong. Bottom line, I was never successful.
Guess I’d better just stick with the Arduino IDE. At least I got that to work.
Thanks for all of your help and understanding.
Hi @smithhal, I’m also fairly new to PIO. It’s true that in PIO there might be multiple libraries with nearly identical names. Here is what I do:
In order figure out what is the “Arduino equivalent” library, I first look at the Arduino’s Library Manager. Looking closely at the library you are using you can see the author’s name. For example, for the LiquidCrystal_I2C library that I have installed the author is Frank de Brabander.
Then in PIO I look for a library of the same name from the same author:
And that’s it. If you want to be double sure, you can also select “More Info” in the Arduino’s Library Manager and “Repository” in PIO’s Library registry and make sure they bring you to the same GitHub repo.