How to RUN a library

Goodmorning,
I am just entering the subject and I have a "big" problem using libraries: I don't know how to run them.

I found many detailed instructions about how to create and save a library, but I wasn't able to find any instruction about how to use them (...).

My (maybe silly) question in detail: ONCE I installed a library in my Sketch, how can I know which are the inputs, data, variables, ..., used by the library, or anyhow necessary to run it?, i.e (as an example): once I have "#include <Stepper.h>" present in my Sketch, how can I proceed for instructing a step motor to make 100 steps?

Furthermore: how can I read (edit?) the content of a library?

Thanks for your (indeed necessary, for me) support

Luckythecat:
Goodmorning,
I am just entering the subject and I have a "big" problem using libraries: I don't know how to run them.

I found many detailed instructions about how to create and save a library, but I wasn't able to find any instruction about how to use them (...).

My (maybe silly) question in detail: ONCE I installed a library in my Sketch, how can I know which are the inputs, data, variables, ..., used by the library, or anyhow necessary to run it?, i.e (as an example): once I have "#include <Stepper.h>" present in my Sketch, how can I proceed for instructing a step motor to make 100 steps?

Furthermore: how can I read (edit?) the content of a library?
Thanks for your (indeed necessary, for me) support

Libraries should be, and usually are, documented. The documentation may be online where you obtained it, and/or included in text files with the library package that you downloaded. Often there is a folder inside the library, containing examples. I've noticed that the IDE loads them into its examples list automatically in this case. Look under the File tab. They are in File->Examples->Examples-from-Custom-Libraries.

To read or edit a library, just find the library folder in "libraries" in your sketch folder, and have at it with the text tools of your choice.

The built in libraries are documented on this Arduino website, under Learning->Reference->Libraries.

Luckythecat:
.e (as an example): once I have "#include <Stepper.h>" present in my Sketch, how can I proceed for instructing a step motor to make 100 steps?

It is more appropriate to say "how do I use a library"

You need to read the documentation. And most libraries include example code.

The source code for all the libraries is available. The standard libraries (such as Stepper) come with the Arduino IDE. If you do decide to change the code in a library I suggest you make your own copy of it with a different name to avoid confusion. That way you can use the original or the changed version.

...R

Many thanks for your clear (an useful) reply, but (forgive me) I need further information: how I can read .adoc .properties .cpp or .h files? (what software are needed?)

Thanks

Ha ha... I use WordPad at the moment. I know there is better. There is nothing magic about source (program) files. They are just text.

Luckythecat:
Many thanks for your clear (an useful) reply, but (forgive me) I need further information: how I can read .adoc .properties .cpp or .h files? (what software are needed?)

Thanks

So 3 things:

  1. if you don't know what software to use to read cpp files, you are nowhere near ready to modify libraries. You can use them, but please do not modify them. They are there to be used, and rarely need to be changed.

  2. .cpp, .h can be read with any standard text editor, or the Arduino IDE. Something like notepad++ if you are on windows.

  3. You rarely need to look at the library .cpp file, or even the .h file. Read the library documentation and then use the library as described in the documentation.

Look at the documentation and examples. Libraries usually include functions that you can call. For example a library "foo" may well provide a function "foo", eg.

foo (42);

That's how you use the library. You call the functions in it. The functions are documented. You don't need any other software.

I use Notepad++ on Windows to read and edit .cpp and .h files

If you have more questions please state which library you are having problems with. Saying you have problems with "libraries" is like saying you have problems with "pets".

Another thing, you said our support is necessary. In fact, it isn't since library use is documented.

Well, let me say that my (to be more correctly entitled "how do I use a library") question has been completely answered: many thanck to all of you for your kind support.