How does one determine what commands are available in an included Library?

Hi All

We'va all used Libraries within include statements in our sketches, together with the commands that the library allows you to use with it.

I would like to know how to find out more about what commands are included with the llibrary. Is it simply a case of looking through the c code of the library itself? How do we find out what commands are included with each library?

Thanks.

A good library comes with good documentation. Simple as that.

Gabriel_swe:
A good library comes with good documentation. Simple as that.

One would think so, yes. But sadly that is not the case. there are even many AdaFruit libraries that don't come with 'Additional Commands' documentation.

So... back to my original question, how does one find out what additional commands are provided with any obtained libraries?

theMusicMan:
One would think so, yes. But sadly that is not the case. there are even many AdaFruit libraries that don't come with 'Additional Commands' documentation.

So... back to my original question, how does one find out what additional commands are provided with any obtained libraries?

however well or poorly documented or commented they are all "listed" in the class definition in the header file and detailed in the implementation file.

if the functions are well named, that can tell you a lot.

If there's no documentation, read the code. The .h file may be enough, but in the end, the only way to be sure is the source.

BulldogLowell:
however well or poorly documented or commented they are all "listed" in the class definition in the header file and detailed in the implementation file.

if the functions are well named, that can tell you a lot.

Awesome... thanks.

So, the header file is the dot h file yes? and the implementation file is dot cpp?

I am trying to trace the way through an example BMP280 sensor file in an attempt to learn where these additional commands are, so your info is very helpful. Thanks.

wildbill:
If there's no documentation, read the code. The .h file may be enough, but in the end, the only way to be sure is the source.

Thanks Bill.
I see a .h file, but what is and how can I view the source?

theMusicMan:
Awesome... thanks.

So, the header file is the dot h file yes? and the implementation file is dot cpp?

I am trying to trace the way through an example BMP280 sensor file in an attempt to learn where these additional commands are, so your info is very helpful. Thanks.

yes and yes.

Sometimes programmers may put all of the class including its source into a single header...

POST what you want to know more about

BulldogLowell:
yes and yes.

Sometimes programmers may put all of the class including its source into a single header...

POST what you want to know more about

Awesome info. Thanks!

BulldogLowell:
POST what you want to know more about

I will do, missed that comment sorry.

I am simply trying to ascertain where to find all the additional commands that are provided within any given library so that I can:

(1) understand the programming language and structure better and
(2) perhaps make my own use of the provided code and hence write my own files instead of having to use the example ones often provided.

I am out of time this evening as I am shortly off out, but will continue this tomorrow. I'll provide more info about the example code I am trying to figure out the path/flow of. Thanks.

theMusicMan:
Thanks Bill.
I see a .h file, but what is and how can I view the source?

I meant the cpp file, although really both .h & .cpp should be considered source code.

wildbill:
I meant the cpp file, although really both .h & .cpp should be considered source code.

More great info, thanks! Learning something new all the time.