require Arduino.h cpp file

Thread Starter

Alex1700

Joined Jan 12, 2020
107
Hi guys I cannot find the Arduino.h cpp file I only found out about the Arduino.h header file
May I know where can I find the Arduino.h cpp file?

1679801210226.png
 

geekoftheweek

Joined Oct 6, 2013
1,216
Do you mean you cannot find the Arduino.h file itself or the functions it refers to? What you have shown is the beginning of the Arduino.h file itself.

What it refers to is actually going to be different depending on what you are programming. Arduino.h is more or less the base headers that are used with every different variety of microcontroller that Arduino Studio is capable of compiling programs for. Each controller is going to have a standard library that includes all the functions listed in Arduino.h. From there all the other libraries will be able to be linked to the program with little to no changes between controllers due to the standard functions defined in Arduino.h.

If you are looking for Arduino.h itself either you have already found it, or have posted a screenshot from somewhere else. It will be somewhere in the Arduino Studio installation.
 

Thread Starter

Alex1700

Joined Jan 12, 2020
107
Do you mean you cannot find the Arduino.h file itself or the functions it refers to? What you have shown is the beginning of the Arduino.h file itself.

What it refers to is actually going to be different depending on what you are programming. Arduino.h is more or less the base headers that are used with every different variety of microcontroller that Arduino Studio is capable of compiling programs for. Each controller is going to have a standard library that includes all the functions listed in Arduino.h. From there all the other libraries will be able to be linked to the program with little to no changes between controllers due to the standard functions defined in Arduino.h.

If you are looking for Arduino.h itself either you have already found it, or have posted a screenshot from somewhere else. It will be somewhere in the Arduino Studio installation.
actually, i am looking for Arduino.cpp file of the Arduino.h I want the code of each of the functions inside the Arduino.h file in the header file only have function prototype only
 

geekoftheweek

Joined Oct 6, 2013
1,216
Sorry to deliver the bad news @Alex1700 but there is no Arduino.cpp. Arduino.h is just a list of standard functions common to all controllers the Arduino Studio is capable of programming. For instance Arduinos are all based (as far as I know) on various Atmel Microcontrollers and ESP8266 is an Espressif Microcontroller. Both use Arduino.h as the main header file, but neither one uses the same programming from there. Atmel would for the most part have no use for a yield() function so it probably doesn't do anything, but is defined anyways... the ESP family on the other hand would all take a loop through the system loop to handle WiFi events.

You will have to scour the source files related to your actual microcontroller to find the functions listed in Arduino.h
 

djsfantasi

Joined Apr 11, 2010
9,163
Sorry to deliver the bad news @Alex1700 but there is no Arduino.cpp. Arduino.h is just a list of standard functions common to all controllers the Arduino Studio is capable of programming. For instance Arduinos are all based (as far as I know) on various Atmel Microcontrollers and ESP8266 is an Espressif Microcontroller. Both use Arduino.h as the main header file, but neither one uses the same programming from there. Atmel would for the most part have no use for a yield() function so it probably doesn't do anything, but is defined anyways... the ESP family on the other hand would all take a loop through the system loop to handle WiFi events.

You will have to scour the source files related to your actual microcontroller to find the functions listed in Arduino.h
Just to add, the Arduino IDE supports other chips and development boards. For example. I use MicroChips ATTIny85s quite a lot.
 
Top