Pages: [1]   Go Down
Author Topic: Other Serial.print special characters?  (Read 1935 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
Karma: 0
Posts: 102
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I noticed that serial.print has a special character for tabbing.


Are there any others?  I thought it might be nice for making debug pretty.

I ran the alphabet and the complier accepted these


I have no clue what it spits out.  The debug window gave me junk that's I can't get to show up in the fourm.

Is there a list? Is these a carriage return?  Others?

thanks in advance!

« Last Edit: December 31, 2010, 04:47:36 am by george_graves » Logged

Global Moderator
Offline Offline
Shannon Member
Karma: 210
Posts: 13036
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There are "special characters" but what's important is the receiving side.  That's where the characters are interpreted.  From the sender's perspective, they are just 8 bit values.

What are you using?  Serial Monitor?

"\r" is carriage-return.
"\n" is line-feed.

I believe Serial Monitor interprets "\r\n" as "advance to the next line".

Copenhagen / Denmark
Offline Offline
Edison Member
Karma: 6
Posts: 2360
Do it !
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here's a list of the commonly used escape chars in C programming.

I don't know if all of them are implemented on the Arduino.


Of course those that has to do with UNICODE chars are not implemented on Arduino.
« Last Edit: December 31, 2010, 04:59:02 am by MikMo » Logged

Pages: [1]   Go Up
Jump to: