system
November 2, 2014, 9:17pm
1
Hello Arduino Comunity!
Please, I can't find a way to print correctly some strings by the serial connection over the 128-ASCII character, like this:
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.println("Atenção");
for(;;);
}
When I try to print a string that contains "ç", "ã" or something there`s no in english language I receive at my Serial Monitor something distorted.
How can I do it right?
Is there any library for this?
system
November 2, 2014, 10:51pm
2
Printing Extended ASCII characters in a String by the Serial Monitor
You don't have a String (count your lucky stars), so no worries, eh?
How can I do it right?
You assume that you can. I don't know that that is a valid assumption. You can print non-standard ASCII characters (some of them, anyway), using the \nnn notation, where nnn is the extended ASCII character that you want to print.
guix
November 2, 2014, 11:28pm
3
Hello and welcome
You can solve this problem by opening the preferences.txt file:
In the Arduino IDE, go in Files -> Preferences
At the bottom of the Preference window you have a link to the preferences.txt file
Click it to open the file, then close the IDE
In preferences.txt, find setting preproc.substitute_unicode and change it's value from true to false
Save it, re open IDE, upload your sketch and it should work now
At least it did for me
system
November 3, 2014, 1:34am
4
OW! Thank you so much guix! with your hint my program worked really perfect now!
Thanks for your welcome, i'm really a newbie in Arduino World like my status says! =p