I've merged a couple of sample sketches; the first reads info from a RTC module and the second displays it on an OLED.
I've been sifting through the code to remove what wasn't needed - and understand what was. I started by removing several libraries and was somewhat surprised that the sketch continued to compile -> upload -> and run correctly with Wire.h commented out.
I thought that library was needed for I2C communications? (Which both the RTC and OLED most certainly use). Can anyone give me a "heads up" as to why the sketch is still working? Is Wire.h now included implicity with later versions of the IDE or something? (I'm using v1.8.13).
Many thanks. I've been keen to look inside some libraries to figure out "how they tick" - how does one go about doing that to find info like you've listed?
Any user installed libraries will be in your sketchbook\libraries folder. Just navigate to the library that you want and open the .h and .cpp files in a text editor. In general the .h files contain all the variable and function declarations and the .cpp files contain the function definitions (the guts of the functions). Files can be included in either of the .h or .cpp files.