I was trying to install the following library:
ssd1306 by Alexey Dynda
but when I press install the following lib is being installed:
SSD1306 by Majenko Technologies
It seems like library manager has problems identifying libs with duplicated names.
Windows 10 1903, PlatformIO Home: 2.3.2, Core: 4.0.3
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
Well, this could be a problem⦠I fully agree⦠that mode is wrong⦠it should install the library you are on (i.e. by id)⦠not be āautomatically chosingā anything.
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.
-Hal
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.