Arduino Forum

Forum 2005-2010 (read only) => Software => Interfacing => Topic started by: jman31 on Jan 22, 2010, 02:08 am

Title: Contents of a Library? (beginner question)
Post by: jman31 on Jan 22, 2010, 02:08 am
How can you tell what functions and processes are in someone's library if it isn't shown by them? I mean, if for instance I click on this LCD library (http://www.arduino.cc/playground/Code/Menu) and I get the example, but no function explanations. Is there a way to see what was defined in the library and what can be done with those functions? Like this example. (http://arduino.cc/en/Reference/LiquidCrystal) It's not just this library, it seems like there are a lot like that. Am I just missing something
Title: Re: Contents of a Library? (beginner question)
Post by: PaulS on Jan 22, 2010, 02:18 am
The library consists of a header file and a source file. The header file defines the functions that are implemented by the source file.

Typically, the developer includes comments that define what each function does, what the input and outputs of the function are, and what error conditions might arise from using the function incorrectly.

If not, you can always read the source code.
Title: Re: Contents of a Library? (beginner question)
Post by: jman31 on Jan 22, 2010, 02:29 am
How do you read the source code?
Title: Re: Contents of a Library? (beginner question)
Post by: PaulS on Jan 22, 2010, 02:33 am
It is in the Arduino's hardware/libraries folder, under the name of the library. There may be more than one .cpp file.
Title: Re: Contents of a Library? (beginner question)
Post by: jman31 on Jan 22, 2010, 02:44 am
Wow, boy am I thick. I just opened it up in notepad and there it was. That will make life a lot easier!  Thanks once again PaulS!

Regards,
Jeremy