I am new to programming, but otherwise very tech savvy. In the world of Arduino IDE programming, I am trying to understand a few things about include libraries. How does one go about learning what functionality a library offers? I notice that after installing a library, there is often new example sketches to look at, but I was wondering if there was a better place to find such info?
Notice the links to:
- Language
- Functions
- Variables
- Structure
- Libraries
- Glossary
For example here's the Arduino reference page for the SD card library:
DroneBot Workshop Robotics Engineer
James
Most of the libraries available for the Arduino are Open Source i.e. written by amateurs. Some are well documented, an example is the "Arduino SD Library" mentioned by @robo-pi immediately above. Others are poorly documented leaving the user to try and identify methods employed from the accompanying example sketches.
Here is a tip for finding out what methods/functions and defined constants are available from each library without sifting through the .cpp file!
Go to your sketch folder, open up the libraries folder, open your chosen library folder and, if the programmer hasn't been too lazy, you will find a file called "keywords.txt". This lists all the above-mentioned info and will give you a starting point to use any particular library function.
Alternatively, look in the .cpp file for "::", this generally is a separator between the class name and a function.
Example:
void FirmataClass::begin(void)
FirmataClass = Class Name
begin(void) = Function
I hope this brings a little more clarity about the subject of Arduino/C++ libraries.