Why is there not a standard?

I've been doing Arduino projects on and off for years. Every time I get back into it, I have a month of trying to figure out where to put the libraries, AND the .h and other files. So now I bought these awesome -sarcasm- touch screen from banggood (which won't allow you to upload a bad review) and I'm lost. I've got the .h file all over my computer (which actually worked last time I tried this) and it still won't find the file.

I've read the stupid library instructions several times, and with the most modern update to Arduino, it's even more complicated than ever! It doesn't even let you know where they actually go anymore! Ancient Chinese secret.

If I use the Arduino function to add a library, well whatever I do does not work. So...

Why not just say, this file goes here... and that file goes there... wouldn't that be simpler?

So on to the crappy banggood touch screen. Even after I tossed the touchscreen.h file all over my computer, and it compiles and uploads without having any errors, the stupid thing is still won't work. Worthless.

(deleted)

Read this:

I think this guide is very good:

If you can point out any specific faults I'll try to get them fixed. If you just generally can't follow directions then you're probably not going to have much luck with Arduino anyway. "Tossing" the touchscreen.h file all over your computer is not the way to go about this. Having a bunch of copies of a library scattered around will only cause problems in the future. The right way is to research until you understand the correct procedure for installing a library and then follow that procedure.

It explains the three different methods for installing a library.

Library Manager is the easiest but can only be used for libraries that have been added to the Library Manager index. That is a voluntary process so if the library is not in the index it is the fault of the library author for not having submitted their library.

Importing a .zip Library is the second easiest but it requires the .zip file to have the correct folder structure. If it doesn't that is the fault of the library author.

The final option is manual installation, which will work for any library. I think it's very well explained.

f16bmathis:
I've been doing Arduino projects on and off for years. Every time I get back into it, I have a month of trying to figure out where to put the libraries, AND the .h and other files.

Not sure. I've been tinkering with arduino for a couple of years now, and got the hang of it now. I do recall first getting into it at the beginning. One of the most significant things I remember was somehow eventually finding out that there's a "libraries" directory (or something like that), where we not only have to put arduino libraries....but also something about sub-directory name within the 'libraries' directory need to be the same base-name as the library files.... eg. sub-directory called "hello"....and the files inside that are "hello.c, hello.h etc". At that time, I thought that they should put on page #1 of the arduino sketch user guide ...... "note the 'libraries' directory, and note these following important things.........".

Other than that. No problem, especially when they have this other method (a feature in Arduino Sketch software these days) of importing zipped libraries.

Then......... once we figure out what we need to do, it's then beneficial to generate a small text file or a MS Word document etc ...... to document (write down) all the important steps for ourselves. So next time we come along to start up again, we get a massive head-start ...... no need to do double-work and try figure things out again, and each time.

I hate to tell you this, but they go in the same place they've always gone. It hasn't changed. There's the new library manager that supposedly helps you put them there, but libraries still go in the sketchbook folder in a folder named libraries. In there each one needs to be ina folder whose name matches the name of the .h file (without the . and the h obviously.).

Download the library zip file from GitHub and save it somewhere. Go to the Arduino IDE under Tools - Manage Libraries and select upload .zip. Find your library zip file, and you’re done.

The biggest problem I've seen is that a lot of tutorials and library installation instructions assume that people are using the default Windows sketchbook location. Luckily the official Arduino documentation doesn't do this.

I agree with Southpark that it's a very good idea to keep some personal notes for any process that was initially difficult to figure out. Often I find that when I only need to do such a process occasionally I have since forgotten the exact details and have to figure it out all over again if I didn't take the time to make notes. I find that especially useful for some Git operations.

Libraries have always been a PITA.
when I first started, I put all my needed libraries into the correct folder
then moved up to the newer IDE version at that time and it wiped out all of my libraries and just put in all the default stuff.
but I have to say that when I was able to use the Ardion IDE the librariy manager made things easier.

alas, I cannot get it to load on my Win7 box. the recommendations have been to either get a newer computer with win10 or switch to linux.

I truly wish there was a simple to use IDE that did not run as web based or in flash, but just ran as a program on my PC. alas, I ask too much.

dave-in-nj:
moved up to the newer IDE version at that time and it wiped out all of my libraries and just put in all the default stuff.

That's what happens when you install libraries to the Arduino IDE installation folder and is why you should never do that. That's another bit of bad advice I frequently see in library installation instructions.

dave-in-nj:
alas, I cannot get it to load on my Win7 box.

Works for me even with a super outdated computer out in my workshop that's running Windows 7.

dave-in-nj:
I truly wish there was a simple to use IDE that did not run as web based or in flash, but just ran as a program on my PC. alas, I ask too much.

Simple to use is basically the whole idea behind the Arduino IDE. It has gotten more feature rich, and thus a bit more complicated, in the last couple of years but still it's not too bad and I don't think they've gone too far. It's definitely a delicate balance between something that's so basic as to be useless for anyone except a beginner and something that's so complex it becomes another Atmel Studio or Eclipse.

Nice rant in the OP.
Sometimes the efforts of system designers to hide gory details from their users backfire because it leaves the user helpless in the face of the unexpected.
Anyway, 2 things may help here, most of which has already been said.

  1. The library path can be found (indirectly) from file—>preferences in the IDE.
  2. If you get a library file from Github etc. , pay particular attention to the name and structure. Sometimes you have to remove the ‘master’ name postfix etc. sometimes you have to fish out the .h, .cpp and other files at that level and put them in their own directory named after the .h file before copying the directory into the libraries folder.
    But if you are having trouble at this level, it is a bit early to be making negative comments about that screen you bought.

6v6gt:

  1. The library path can be found (indirectly) from file—>preferences in the IDE.

Very indirectly, my Arduino installation lists as the sketchbook location, which is also one of the locations the \libraries folder can be as;

C:\Users\Admin\Documents\Arduino

And at least on my Win7 PC, I know that folder cannot be found in windows explorer, I do know where it is however.

Hi,
I put ALL my downloaded libraries here;

Library__Document__Arduino__Libraries

libraryplacement.jpg
Keep them zipped if they are zipped.
Keep them in there OWN folder.

I have never had any problems, any IDE update knows where the Library folder is with extra libraries.

Tom... :slight_smile:

libraryplacement.jpg