I’m working on a weather program using an ESP8266 and trying to print the degree symbol (ASCII code 176) to the PlatformIO Serial Monitor. When I print the character, I see a black diamond with a question mark in the center.
My question is, does the Serial Monitor support the ASCII extended character set?
This is the print statement I’m using: Serial.println(’\xB0’);
I also tried Serial.write(0xB0) along with other variations with the same result.
Serial.println(’\x41’) prints the character A as expected.
Ah, I see that you did it a bit differently than I did.
I was doing it by printing the ASCII hex character code in the print statement: Serial.print("Wind dir: "); Serial.print(wind_deg); Serial.println("\xB0");
But I see that you embedded the character in the line as: Serial.print("Wind dir: "); Serial.print(wind_deg); Serial.println("°");
Your way works for me also. But could you try it by using the ASCII character code in the print statement as I was originally doing and let me know if that works?