That’s PIO/VS, with the 1.6. It’s in the pio folder. We have the library. My typing was just fine. This code won’t compile for lack of the NeoPixel library of which we have three copies locally.
I keep improving, but I keep running into this, where ‘the system’ doesn’t work.
There has to be a way to force/jam these libraries. If there isn’t, somebody who knows how to program has to make one.
Why have you got both versions of the same library? This confuses me, I’ve no idea what it does to PlatformIO.
Given that you have three copies locally, you are possibly fscking thing a little. Do the following to clean things up a bit:
Run a “build clean” to get rid of generated files. (The dustbin/trash can icon on the PlatformIO toolbar).
Delete the .pio folder from the project’s folder.
Fix platformio.ini to get rid of duplicate libraries.
Run a build. (the tick/check mark on the toolbar).
So, you say that the code will not compile because of the Neopixel library, what are the actual errors you are getting after running the above of course.
Libraries do work, honest, I’m writing about a dozen of them for my own use (at the moment) for a forthcoming book and they “just” work.
Am I missing something from lib_deps above? There’s no mention of the Neopixel library. Hence, when you build the code, that library is not installed. Hence, the code won’t compile.
What’s happening is, the whole thing isn’t working again. As a unit, PIO has decided to stop recognizing libraries in projects that were working when i put them away. Problems with an inactive script are infecting the active script.
Now, the Adafruit 1306 library isn’t even called for. Another file was open, so I built it again, since the problem obviously can’t exist anymore. It’s still asking for 1306. I want to do an I2C scan. Wire is the only library.
I use the built-in library tools, and they fail to put the library in the project- and the library is in the pio folder.
The problem isn’t that PlatformIO has forgotten anything, it’s that you have forgotten what you were advised some time back. Sorry.
The header file you want for the SSD1306 library is named “Adafruit_SSD1306.h” and not “adafruit/Adafruit_SSD1306.h”. It seems you have regressed to a past life when you were somewhat confused by a library name and a library header file. The two are not necessarily always the same.
A library name could be “NormanDunbar/Flintstone Library” and the header file required to use it could be anything.
The Arduino IDE is a cause of much wailing an gnashing of teeth because you choose sketch->add Library and you see something like `#include “some_header.h” added to the top of your sketch. A library is not a header file.
Since PlatformIO 5.0.0, libraries have had a prefix added, “adafruit/” in your case, and this is the vendor/registration owner/distributer of the library. It saves problems with duplicates where two or more “distributers” register a library with the same name. You can now differentiate between the two and choose the correct one for your needs.
Where a library is “adafruit/Adafruit SSD1306 Library” you have two parts to the full library name, the distributer and the library name. The ‘/’ separates the two.
When found, there are tabs with examples, installation instructions, and a list of the actual header files you need to `#include’.
Only use https:// libraries when there are none registered at the above URL. These don;t always tell you what header(s) need to be used to access the library.
Now, having said all that, you have stated that:
Fine, so what on earth have you listed the Adafruit SSD1306 link to github in your lib_deps? If you don’t need the library, take it out and remove the #include that you still have in your code somewhere.
In fact, if Wire is the only library you need, get rid of all of the current lib_deps and just set it to wire.
This is contaminated.
Right now, EVERY project is giving me library trouble.
I’m pasting lib_deps from working projects, and it’s getting rejected.
So it’s unfortunately about more than one project.
Stop pasting stuff at random – use the library search feature URL to find the libraries you need and follow the installation instructions. Copy and paste is not the correct way to understand what you are doing. Start simple and work up from there.
Yes. The thing that frustrated me was doing what you suggest. I’m even given the option of attaching the library to the project, and I do it, and it’s in the folder and it doesn’t work.
"The header file you want for the SSD1306 library is named “Adafruit_SSD1306.h” and not “adafruit/Adafruit_SSD1306.h”. "
I’ve been told in no uncertain terms to make my includes this way.
But 1306 is preventing compilation in a program with no 1306 anywhere.
I’m sorry. This went off the rails, because my webserver won’t work anymore because AsyncTCP is lying about being absent, and I can’t do anything else, because Adafriuit 1306 is lying about being absent, and at least one established, known library in every other script.
Except for the RF24 scripts- and they don’t work.
You have probablybeen told to do your lib_deps this way. You have been told by me, a couple of times at least, to not do it this way because it is incorrect.
With the adafruit bit on the front, you will not find the header file. End of. It simply cannot work as that is not the file name.
That formatissaying “look in afolder called adafruit for a header file called…” and you don’t have that folder.
This is very basic C/C++. Whoever said to use the distributername in the #include was wrong. Unless the library instructions say otherwise.
Use the url I gave you above and follow the
instructions when you need a library.
When I told you, repeatedly, how to do it, I said to change the angle brackets to double quotes.
I told you to use the “adafruit/” part in lib_deps and not in the #include.
It cannot work. Doing it you way means that the header file is located in a separate folder named adafruit – which it isn’t and thus will not be found. It did not work.
I know. But why use the github link when it is already available through PlatformIO as:
lib_deps =
adafruit/Adafruit SSD1306
Use the fscking url I’ve given you numerous times in this, and other, threads. It will take you to PlatformIO Registry which shows how to install the library. Click on the headers tab to see the exact header file names you need. Click on the examples tab to see actual examples.
This library thing is going to continue until there’s a convention on policing libraries and standardizing their publication.
This is not the first post where you come out blaming the system when it is your incompetence that is the issue. Admit your are a novice and ASK rather than BLAME. There is nothing wrong with not knowing and asking a researched question. Blind finger pointing is toxic to a community.
Nope! If you don’t know you are perfectly able and permitted to ask. Everyone has to start somewhere, but for best results, you need to make notes here and there and follow instructions.