Pages: [1]   Go Down
Author Topic: How to know the inside Arduino IDE language?  (Read 401 times)
0 Members and 1 Guest are viewing this topic.
universe
Offline Offline
Sr. Member
****
Karma: 0
Posts: 258
I'm enjoying my Life
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So far I have talked to many IT programmer that this Arduino programming using C++ language...
And they said that yes it uses C++ but using Arduino IDE so it put into 'boxes'...

For example: they never found 'digitalwrite' in C++, but it is found here...
 
I wonder how I open the box so I can get the pure C++ language, anyone could help me?

I hope you could understand what I'm trying to say, dont hesitate to reply/

Thank you smiley-grin
Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6146
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There's no magic.  The Arduino core is just C / C++ code.

Depending on your operating system, the core functions can be found in:

install path/hardware/arduino/cores/arduino/

All of the Arduino functions are there and easily readable.  No boxes.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

universe
Offline Offline
Sr. Member
****
Karma: 0
Posts: 258
I'm enjoying my Life
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmmm well I slightly mistaken said 'box'...
Yeah since it is open source so all is open...

But in C++ I never found digitalwrite, randomSeed, etc...
Could you help me how I understand the function (digitalwrite,etc) in the place you state before :install path/hardware/arduino/cores/arduino/?
Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6146
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That's because digitalWrite(), digitialRead(), randsonSeed(), and etc are all parts of the Arduino core files.  They're just function calls specific to Arduino.

Find the core files in your Arduino installation (you still haven't bothered to say what Operating System you're using).  Then look at wiring_digital.c.  (If you're using OSX or Linux it is easy to use grep to find which file specific function calls are in.)
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

universe
Offline Offline
Sr. Member
****
Karma: 0
Posts: 258
I'm enjoying my Life
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Wooo hooo I got it...
I'm using Windows XP SP2 anw...
So now I know how to the code communicate using C...
Anw, the C code is difficult to understand, it is easier directly know what the Arduino IDE language..

Many thanks!
Logged

Pages: [1]   Go Up
Jump to: