![]() ![]() If you only want to understand how to use the library, and not how it works, stick with studying the example sketches and the documentation Adafruit likely provides in the readme or on their website. There is also some decent information about C++ classes later in that tutorial if you want to understand the library even better. There's some pretty good information about C++ functions here: They are not in any way equivalent or interchangeable. They are two completely different things. It causes the code in the definition of the begin function to be executed. That's a function call of the begin function of the class instance Wire. So the library author must manually add function prototypes for all the functions they define in the library. The Arduino IDE leaves all other file types alone and compiles them as is. ino files of your sketch before compiling it as C++. You might not be familiar with function prototypes because the Arduino IDE automatically generates function prototypes for all the functions in the. It's just telling the compiler "I'm going to define a function named begin that has return type boolean with a parameter of type TwoWire* that has a default value of &Wire". That's the function prototype of the library's begin function. ![]() JohnRob: boolean begin(TwoWire *theWire = &Wire) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |