Post a new topicPost a reply Page 1 of 1   [ 2 posts ]
Author Message
 Post subject: Print special character
PostPosted: Mon Jul 02, 2012 1:06 pm 

Joined: Tue Mar 20, 2012 12:58 pm
Posts: 17
Hello Libelium:

I have a question, to print the character degrees in the output of this program that I need?
Code:
void leeTemp(){
    // Getting Temperature
    USB.print("------------------------------\n");
    USB.print("Temperatura: ");
    USB.print(RTC.getTemperature(),DEC);
    USB.println(" grados C");
}

By measuring the temperature returns me '30 ~ A ° C 'for example, but I want you to print '30 ° C'. I hope I helped. A greeting.


Top
 Profile  
 
 Post subject: Re: Print special character
PostPosted: Mon Jul 02, 2012 6:09 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7455
Hi chusty_09,

It is not a matter of transmission. The character 'º' is not an ASCII, but an extended ASCII, so its printing will depend on the serial monitor you use. The IDE monitor will print a character 'Â' before, the cutecom monitor will print its hexadecimal value, and the gtkterm will print it properly.

Regards.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 2 posts ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Libelium theme based on 610nm Style by Daniel St. Jules of http://www.gamexe.net


© Libelium Comunicaciones Distribuidas S.L. | Terms of use