I have recently started programming some basic stuff on Arduino and I would like to know what is inside any function I use.
I'll give an example:
I am using the LCD display, I downloaded the LiquidCrystal_I2C.h library and with Visual Studio I opened the .cpp file .. and could see how it was written.
I would like to do the same thing with the Arduino's delay() function and, for example, with lcd.setCursor function.
Coming from STM32 I could just right-click and "open function" ... how do I do it here?
a function is a block of code that performs some operation. that operation may be as simple as turning on a LED, in which case it returns nothing, or monitor a button where it returns the state of the button.
functions can be passed arguments so that they can be used with different devices or different purposes rather than duplicating code
there can be multiple functions in one file (e.g. setup(), loop())
Excellent!
I downloaded the latest version of Arduino, previously I was using 1.6 and did not see 'peek'.
If I press "peek", for example, on lcd.clear() the .h file "LiquidCrystal_I2C.h" is opened, not the file "LiquidCrystal_I2C.c" where the function is initialized .. but it's not a problem because since I know that the function is inside "LiquidCrystal_I2C.h" .. I will look at the .c file