Degree Symbol Serial Monitor Arduino Show it

Posted on

Degree Symbol Serial Monitor

Easy way to print the degree symbol on the Arduino Serial Monitor – In various applications, we sometimes need symbols that we want to display on the serial monitor.

For example, when we want to display a temperature of 10 degrees Celsius, we want to display 10 ° C.

As another example, if we want to display the resistance value of a resistance of 10 ohms, then we want it to look like 10Ω.

Arduino uses a character encoding with UTF-8 format.

UTF-8 (Universal Character Set (UCS) Transformation Format)

UTF-8 (Universal Character Set (UCS) Transformation Format) is a character encoding format developed by the Unicode Consortium that stores character data into binary data.

For example we store “hello”, the binary data is 01101000 01100101 01101100 01101100 01101111

UTF-8 is a character encoding that is widely used in web pages (html 5) and e-mails of 1 to 4 bytes in size.

Well, speaking of the Unicode Consortium, they are a non-profit company devoted to developing, maintaining and promoting software internationalization standards and data, especially the Unicode Standards, which define the representation of text in all modern software products and standards.

The Unicode Consortium is actively developing standards in the field of internationalization including defining the behavior and relationships between Unicode characters.

The consortium works closely with the W3C and with ISO and IEC – in particular with ISO / IEC / JTC 1 / SC2 / WG2, which is responsible for maintaining ISO / IEC 10646, the International Standard in sync with the Unicode Standard.

UTF-8 KodeCHARACTEREXPLANATION
\xc2\xa0 NO-BREAK SPACE
\xc2\xa1¡INVERTED EXCLAMATION MARK
\xc2\xa2¢CENT SIGN
\xc2\xa3£POUND SIGN
\xc2\xa4¤CURRENCY SIGN
\xc2\xa5¥YEN SIGN
\xc2\xa6¦BROKEN BAR
\xc2\xa7§SECTION SIGN
\xc2\xa8¨DIAERESIS
\xc2\xa9©COPYRIGHT SIGN
\xc2\xaaªFEMININE ORDINAL INDICATOR
\xc2\xab«LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
\xc2\xac¬NOT SIGN
\xc2\xad­SOFT HYPHEN
\xc2\xae®REGISTERED SIGN
\xc2\xaf¯MACRON
\xc2\xb0°DEGREE SIGN
\xc2\xb1±PLUS-MINUS SIGN
\xc2\xb2²SUPERSCRIPT TWO
\xc2\xb3³SUPERSCRIPT THREE
\xc2\xb4´ACUTE ACCENT
\xc2\xb5µMICRO SIGN
\xc2\xb6PILCROW SIGN
\xc2\xb7·MIDDLE DOT
\xc2\xb8¸CEDILLA
\xc2\xb9¹SUPERSCRIPT ONE
\xc2\xbaºMASCULINE ORDINAL INDICATOR
\xc2\xbb»RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
\xc2\xbc¼VULGAR FRACTION ONE QUARTER
\xc2\xbd½VULGAR FRACTION ONE HALF
\xc2\xbe¾VULGAR FRACTION THREE QUARTERS
\xc2\xbf¿INVERTED QUESTION MARK
\xc3\x80ÀLATIN CAPITAL LETTER A WITH GRAVE
\xc3\x81ÁLATIN CAPITAL LETTER A WITH ACUTE
\xc3\x82ÂLATIN CAPITAL LETTER A WITH CIRCUMFLEX
\xc3\x83ÃLATIN CAPITAL LETTER A WITH TILDE
\xc3\x84ÄLATIN CAPITAL LETTER A WITH DIAERESIS
\xc3\x85ÅLATIN CAPITAL LETTER A WITH RING ABOVE
\xc3\x86ÆLATIN CAPITAL LETTER AE
\xc3\x87ÇLATIN CAPITAL LETTER C WITH CEDILLA
\xc3\x88ÈLATIN CAPITAL LETTER E WITH GRAVE
\xc3\x89ÉLATIN CAPITAL LETTER E WITH ACUTE
\xc3\x8aÊLATIN CAPITAL LETTER E WITH CIRCUMFLEX
\xc3\x8bËLATIN CAPITAL LETTER E WITH DIAERESIS
\xc3\x8cÌLATIN CAPITAL LETTER I WITH GRAVE
\xc3\x8dÍLATIN CAPITAL LETTER I WITH ACUTE
\xc3\x8eÎLATIN CAPITAL LETTER I WITH CIRCUMFLEX
\xc3\x8fÏLATIN CAPITAL LETTER I WITH DIAERESIS
\xc3\x90ÐLATIN CAPITAL LETTER ETH
\xc3\x91ÑLATIN CAPITAL LETTER N WITH TILDE
\xc3\x92ÒLATIN CAPITAL LETTER O WITH GRAVE
\xc3\x93ÓLATIN CAPITAL LETTER O WITH ACUTE
\xc3\x94ÔLATIN CAPITAL LETTER O WITH CIRCUMFLEX
\xc3\x95ÕLATIN CAPITAL LETTER O WITH TILDE
\xc3\x96ÖLATIN CAPITAL LETTER O WITH DIAERESIS
\xc3\x97×MULTIPLICATION SIGN
\xc3\x98ØLATIN CAPITAL LETTER O WITH STROKE
\xc3\x99ÙLATIN CAPITAL LETTER U WITH GRAVE
\xc3\x9aÚLATIN CAPITAL LETTER U WITH ACUTE
\xc3\x9bÛLATIN CAPITAL LETTER U WITH CIRCUMFLEX
\xc3\x9cÜLATIN CAPITAL LETTER U WITH DIAERESIS
\xc3\x9dÝLATIN CAPITAL LETTER Y WITH ACUTE
\xc3\x9eÞLATIN CAPITAL LETTER THORN
\xc3\x9fßLATIN SMALL LETTER SHARP S
\xc3\xa0àLATIN SMALL LETTER A WITH GRAVE
\xc3\xa1áLATIN SMALL LETTER A WITH ACUTE
\xc3\xa2âLATIN SMALL LETTER A WITH CIRCUMFLEX
\xc3\xa3ãLATIN SMALL LETTER A WITH TILDE
\xc3\xa4äLATIN SMALL LETTER A WITH DIAERESIS
\xc3\xa5åLATIN SMALL LETTER A WITH RING ABOVE
\xc3\xa6æLATIN SMALL LETTER AE
\xc3\xa7çLATIN SMALL LETTER C WITH CEDILLA
\xc3\xa8èLATIN SMALL LETTER E WITH GRAVE
\xc3\xa9éLATIN SMALL LETTER E WITH ACUTE
\xc3\xaaêLATIN SMALL LETTER E WITH CIRCUMFLEX
\xc3\xabëLATIN SMALL LETTER E WITH DIAERESIS
\xc3\xacìLATIN SMALL LETTER I WITH GRAVE
\xc3\xadíLATIN SMALL LETTER I WITH ACUTE
\xc3\xaeîLATIN SMALL LETTER I WITH CIRCUMFLEX
\xc3\xafïLATIN SMALL LETTER I WITH DIAERESIS
\xc3\xb0ðLATIN SMALL LETTER ETH
\xc3\xb1ñLATIN SMALL LETTER N WITH TILDE
\xc3\xb2òLATIN SMALL LETTER O WITH GRAVE
\xc3\xb3óLATIN SMALL LETTER O WITH ACUTE
\xc3\xb4ôLATIN SMALL LETTER O WITH CIRCUMFLEX
\xc3\xb5õLATIN SMALL LETTER O WITH TILDE
\xc3\xb6öLATIN SMALL LETTER O WITH DIAERESIS
\xc3\xb7÷DIVISION SIGN
\xc3\xb8øLATIN SMALL LETTER O WITH STROKE
\xc3\xb9ùLATIN SMALL LETTER U WITH GRAVE
\xc3\xbaúLATIN SMALL LETTER U WITH ACUTE
\xc3\xbbûLATIN SMALL LETTER U WITH CIRCUMFLEX
\xc3\xbcüLATIN SMALL LETTER U WITH DIAERESIS
\xc3\xbdýLATIN SMALL LETTER Y WITH ACUTE
\xc3\xbeþLATIN SMALL LETTER THORN
\xc3\xbfÿLATIN SMALL LETTER Y WITH DIAERESIS

For details, click here. Now that we know the UTF-8 code above, let’s see an example of how to use it.

Displaying characters and symbols on the serial monitor Code Program

For writing the basic syntax of UTF-8 is: Serial.print (“UTF-8 code”).

We will try to display the following data:

  • 10 degrees centigrade
  • 90 degree angle
  • 10 ohms
  • 10 micro
  • 10 percent
  • Nokia Registered

To be like:

  • 10 ℃
  • 90 °
  • 10 Ω
  • 10 µ
  • 10%
  • Nokia®

Code Program For Show Degree Symbol Serial Monitor

The program is:

void setup() {
Serial.begin(9600);

Serial.println("10\xe2\x84\x83");
Serial.println("90\xc2\xb0");
Serial.println("10\xce\xa9");
Serial.println("10\xce\xbc");
Serial.println("10\x25");
Serial.println("Nokia\xc2\xae");
}

void loop() {
  // put your main code here, to run repeatedly:

}

Results:

Degree Symbol Serial Monitor Arduino Show it

Hopefully this article can be useful for all. If you find this article useful, please share it using the share button below.