Confused about librarys

I'm running 1.8.0 on a couple Macs. I have Uno boards, Adafruit Pro Trikets and now a couple Teensy 3.2 boards. I first noticed what I thought was odd when running the Teensy installer. It loaded a bunch of library files that seemed to have vanished. Suddenly, I had all sorts of duplicate definition issues. Well it turns out the files were dumped into some hidden library folder inside the Arduino package. So now we have two library folders and one I can't get to? Then someone tells me there's actually three of these folders?

Why is this? What about the original library folder in the Arduino sketch folder? Is that no longer to be used? I liked that one. I could see it, manage it, it worked well.

And another thing. It seems if I include a file from a library folder the IDE includes ALL the files from that folder regardless. Has it always done that? It makes it difficult if your trying to keep your code as small as possible while the IE is grabbing all the source it can and dumping it into your project.

Why do we have three library folders? And two of these we can't see.

Why is it grabbing all the source code from any folder it uses for a project?

This just seemed crazy so I thought I'd ask.

-jim lee

Well for one thing the libraries need modification to support the Teensy 3.x (ARM) architecture.

How can you not find stuff on your own computer?

arduino-1.6.5-r5/hardware/teensy/avr/libraries ymmv

It makes it difficult if your trying to keep your code as small as possible while the IE is grabbing all the source it can and dumping it into your project

Afaik this is not true.
The IDE just picks the library into the compiled code which you included.

The other issue about double (triple?) library folders: yes - I am on a Mac and have the same issue with double entries. As long as they are only producing warnings when I compile a sketch, I don't worry - although I admit it is confusing.

But I didn't have the time so far to identify how to clean it up without deleting the relevant libs.
In some weeks from now I hope that I find the time to clean it up. Maybe you are done with your clean up by then and report back, how you did it so I don't have to re-invent the wheel.

Well cleaning it up seems… pointless? extra frustrating? Because the automatic updates that the IDE keeps doing is stuffing the hidden folders full of duplicate stuff all the time. Its like shoveling water.

tf68:
How can you not find stuff on your own computer?

Well I’m old and feeble. Heck, sometimes I’m happy just to FIND the damn computer!

-jim lee

jimLee:
Why do we have three library folders? And two of these we can't see.

The libraries folder in the sketchbook folder is for libraries you install and custom libraries you write.

The libraries folder in the Arduino IDE installation folder is for the libraries included with the Arduino IDE installation. You wouldn't want the IDE to install these to your {sketchbook folder}/libraries folder because you might have your own custom versions of those libraries in that folder that would be replaced.

The libraries folder in the hardware cores is for libraries specific to that core. These libraries will only be accessible when a board of that core is selected, this allows specialized versions of libraries like SPI for each hardware, otherwise there would need to be one library that attempted to work for any possible hardware, which would be very limiting to adding 3rd party support for different hardware.

jimLee:
What about the original library folder in the Arduino sketch folder? Is that no longer to be used?

It's definitely still used, as I have already explained.

jimLee:
the automatic updates that the IDE keeps doing is stuffing the hidden folders full of duplicate stuff all the time. Its like shoveling water.

I don't think they're hidden and I also don't think they're duplicate. They might have the same name but if there's an update it should always be for a newer version than what you have installed. Maybe you could provide specific examples.

Note that Teensyduino uses a completely non-standard way of adding hardware support for the Teensys to the Arduino IDE. Years ago this may have been necessary due to there not being an official way to do this but since that time Arduino has made it extremely easy to add 3rd party hardware support to the Arduino IDE using a standardized system. Any issues you're having specific to the Teensyduino installer are not really relevant to this forum and should be reported on the teensyduino forum instead(after first searching to see if the issue has already been discussed).

The two in the Arduino application are pretty much hidden on the Mac. You have to know that the "application" is actually a package of stuff and then how to open it. Once you get in there, it makes more sense. But a bunch of the Adafruit library files are in there causing issues. I don't know who's responsible for stuffing them in there.

-jim lee

jimLee:
The two in the Arduino application are pretty much hidden on the Mac.

That makes sense. Windows tries to hide certain folders/files also, very annoying.

jimLee:
a bunch of the Adafruit library files are in there causing issues. I don't know who's responsible for stuffing them in there.

The IDE won't do that. Maybe they are part of Teensyduino, which does install things to the Arduino IDE installation folder(at least the last time I installed it).

Well. I was successful in the end.

Lets see if this link works..

Success!

I now have the beginnings of a tiny OS that runs in the background of your sketches. So if you want your sketch to have a little more pizzaz, this is the ticket!

Cool huh? Sadly the full tool kit with the window manager part is now too big for an Arduino. But it fits fine in a Teensy and I'm betting it'll fit fine in an Adafruit feather. The pic is of a capacitive touch screen shield originally for an UNO wired to a Teensy running at 72 MHz.

Next is to add a "click" sound to the button presses.

-jim lee