A few questions from a new user.

Obtained an UNO board recently and have been playing with it for a week. Worked my way through about 10 of the beginner tutorials without to much fuss.

I do have some programming experience but this was 20 years ago; Microchip PIC assembler and C.

Question 1. After 'uploading' a program to the UNO the interface program reports a % of total space used. This report is has been typically 8% for a very small amount of code. This the storage really this small and does this % value include any library functions that are included?

Question 2. How on earth does anyone know how to use a library function? Surely if someone writes a library function they should include instructions on how to make use of it? I know you have to have an 'include' statement, but its an mystery of how anyone knows what 'calling' functions are available.

Thank you for any helpful advice.

This the storage really this small and does this % value include any library functions that are included?

Yes, of course. Only those functions in the library that you actually use get compiled.

it's a mystery how anyone knows what 'calling' functions are available.

Find the library in the library folder, there should be example code to demonstrate how to use the library.

The space reported is for the entire program, with libraries.

Most libraries come with some example programs, and some even have decent documentation. Many Arduino libraries are available on Github, which keeps both documentation and code.

All of this is open source and free, some provided by amateurs and some by professionals. So, the code quality and documentation varies.

Surely if someone writes a library function they should include instructions on how to make use of it?

True, but many do not. If that is the case you can always examine the source code. The .h file contains the variable and function declarations. That can tell you what functions there are and what arguments the functions take and what the functions return. The .cpp files contain the function definitions. That is what the functions to and how they do it. And like Perry says, there should be examples to help you to understand the library.

Thank you.
My Arduino IDE is installed on a MAC computer and is bundled with about 20 libraries selectable from 'Sketches' -> 'Include Library'. However I've not found any way to learn what each one does by easily finding an example code or readme file. I suspect there may be code examples in some of the more advanced tutorials bundled with the IDE. Not tried Github yet. I would simply imagine it would be obvious to include user information but shocked to find none associated directly with the library itself. I will look on Github also.

Most Arduino libraries have API's. Some API's, especially add-on API's, are on Github.

However I've not found any way to learn what each one does by easily finding an example code or readme file.

In the Arduino IDE menu bar, open file>examples and scroll down to "Examples from custom library".

jremington:
In the Arduino IDE menu bar, open file>examples and scroll down to "Examples from custom library".

That helps a lot for the bundled libraries. Thank you.

It works for any libraries you install using the library manager, too.

kneeop:
My Arduino IDE is installed on a MAC computer and is bundled with about 20 libraries

The documentation for most of the standard libraries is included in the Documentation/Reference/Libraries section of this website.

However I agree with you that most of the 3rd party libraries are very poorly documented. And I don't consider a few examples to be a substitute for "documentation", Neither is the expectation that the user will study the source code - the people most in need of documentation are the same people who will have the greatest trouble making sense of source code. Unfortunately people who contribute Open Source code seem to have a strong preference for writing code rather than documentation.

...R

Question 2. How on earth does anyone know how to use a library function? Surely if someone writes a library function they should include instructions on how to make use of it? I know you have to have an 'include' statement, but its an mystery of how anyone knows what 'calling' functions are available.

Most of the libraries come with built in examples. Each library should come with a simple starting sketch mostly called "Hello World" or a "strand test. Sometimes they only contain one example - than it should be obviously, where to start. The examples will explain how to use the library.

If you need more information what a library does, either see if the library folder contains a doc folder or links to a web resource with more information.

If you can't find additional information, read the .h and .cpp files.

If you aren't happy with a library - uninstall it, make your own library from scratch, document it in the way you think others are happy with it and publish it.

noiasca:
If you aren't happy with a library - uninstall it, make your own library from scratch, document it in the way you think others are happy with it and publish it.

In the sense that this implies collaboration on Open Source projects it is good idea.

But it's not much use for a newbie who discovers a library that seems to cover what they need but which does not explain how to use it.

...R

On the other hand, I have learned a lot by using poorly documented libraries.

OK, so this or that library is OK but I want to know more. No Documentation. OK look in the .h and .ccp files. Oh that's how to make a class for an Arduino, that's how to use wire and SPI. Now I can write SPI code using the ESP32 SPI API.

Yes, for a newbie that the documentation is poor is a bad thing but when given lemons make lemonade.

Idahowalker:
when given lemons make lemonade.

filed!
karma+

Idahowalker:
On the other hand, I have learned a lot by using poorly documented libraries.

That's good to hear.

But I suspect that many newbies will just give up in frustration and I don't believe we should consider that acceptable.

...R