Hello, I'm new in Arduino programming and checking several examples. However I see that different examples uses different commands for the same job by using same library or different libraries. Now I wonder how do they know which commands can be used for any library.
For example I wanted to work on DS1307 RTC module by using RTClib.h library. To find available commands I checked arduino website at the link below and saw the list of commands. However when I tried using a command in that list I realized that it is not available in this library.
For example in this link I found rtc.getHours(); command but it is not available in this library. I've found several examples but I want to write my own code by using such document. Can you share me or tell me how do you know which commands can be used in a specific library?
If you open the .h file of the library in an editor then you will be able to see the public functions that are available. Opening the corresponding .cpp file will allow you to see how the functions are implemented. Looking at the examples that came with the library is also a good way of discovering what is available too
sterretje:
Your installed 3rd party libraries are (on a windows system) in C:\Users\yourUserName\Documents\Arduino\libraries. No need for a visit to github
Power_Broker:
But it's so much easier with GitHub...
I would strongly dispute that. To start with the library files on the PC are guaranteed to be those being used by the program and not another library with the same name and they can quickly be accessed and opened with an editor
sterretje:
Your installed 3rd party libraries are (on a windows system) in C:\Users\yourUserName\Documents\Arduino\libraries. No need for a visit to github
That is just the default location of the sketch folder. Anyone who's changed it in the preferences (like me) will need to look in that location for the libraries folder, not this one.