Go Down

Topic: Serial.println (Read 2862 times) previous topic - next topic


Hi all!

Someone could tell me where i can find the source code of the function Serial.println used in IDE of arduino.
Thanks in advance!


Coding Badly

{Arduino Path}\hardware\cores\arduino\Print.h

{Arduino Path}\hardware\cores\arduino\Print.cpp


as said before, in the Arduino path, you look for hardware\cores\arduino
it has all the sourcecode for the individual arduino functions like digitalWrite, pinMode, etc. so if you fancy taking a look, that's where you'll need to be.


Thanks, i will take a look!



I see functions like this one,

Code: [Select]
void Print::println(const char c[]){

in this  file {Arduino Path}\hardware\cores\arduino\Print.cpp

what this mean void Print::println? it is not usual to see this, i think.



Apr 02, 2010, 06:52 pm Last Edit: Apr 02, 2010, 06:57 pm by AWOL Reason: 1
what this mean void Print::println? it is not usual to see this, i think

It means "println" is a member of the class "Print", and is  a "void" (i.e. it doesn't return a value) function.
That's C++, and perfectly usual.

You'll see that that there are different versions of the functions, distinguished only by their parameter types. This is called "overloading"
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.


Ok, thanks, i never seen C++ source code, only C, that is why i couldn't understand.


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131