Learning about what libraries do

Hey everyone, this is gonna be an insanely noob question but I just couldn't figure this out on my own.

While looking for help for standard commands it's easy to just google "arduino reference blablabla", but I'm having trouble identifying what a given library can do - as the same google search will usually bring up nothing, or just a download link to the library, but no documentation.

I'm just playing around with an Arduino starter set which comes with different sensors that all require different libraries. And while there is example code on how to use the component, I would like to understand what exactly the library can do if I ever want to use it outside of an example context.

The only thing I have managed to do so far is go in the library folder and look at the .h and .cpp files - but tbh, it's all gibberish to me - how it's written/the commands it uses. I don't have a deep programming background, I can happily type away at my sketch, but the .h/.cpp is beyond me.

tldr: Where/how are libraries usually documented, since apparently I'm too stupid to find it. :confused:

Thanks all!

tldr: Where/how are libraries usually documented, since apparently I'm too stupid to find it.

The header and/or source files may contain clues as to what the library does, but there is no industry standard way to do that.

There may, or may not, be a separate file that documents what a library does.

The best documentation is the examples.

The best way to move beyond the examples is experimentation, with asking questions on the forum (in the correct section) being the second best way.

cbfunky:
or just a download link to the library, but no documentation.

Alas, the folk who write Open Source code more often than not seem to have no interest in writing documentation to support their programs.

For what it's worth the AccelStepper and the TMRh20 RF24 libraries have reasonably good documentation. Even they are far from perfect but they are head-and-shoulders above most other libraries.

The standard Arduino libraries are documented in the Reference section

...R

Ah, excellent, so it's not me >_<

Thanks for the replies!

One easily overlooked place where library documentation is occasionally published is in the wiki of the library's GitHub repository. To see the wiki content, go to the repository's home page and click the "Wiki" tab. If you don't see a "Wiki" tab, it means the repository doesn't have one.