Is ((char)248) correct character for Degree Symbol?

Hi was writing some display for my SERIAL OLED SCREEN,0.96" I need to display ℃ and I am using :

(char)248

The degree symbol comes kind of in the middle instead of top left corner. Is there any other way to display the degree symbol so that it will come on the top left corner?

you can try iterating over the ascii range to try to find what you want:

pseudo:

for (int i = 34; i < 256; i++)
{
  OLED.print(i);
  OLED.print("=");
  OLED.print(char(i));
  delay(1000);
  OLEDclear();
}

kind-of-thing…

Hi @BulldogLowell

Thank you so much for the suggestions. I tried that and found that char(247) was the correct one. It seems like the values are shifted by 1 character on the extended particle’s’ ASCII table compared with other table.

For example:
On Photon :
247 : degree (°)
248 : bold dot
249 : period (.)

On other websites: One example
248 : degree(°)
249 : bold dot
249 : period (.)

Also, different websites have different values. How can ASCII character be different ? Isn’t it universal ? Or is there anything that is making it different ?

I think the ASCII character for degree is 176.

If you are on Windows you should have a program called charmap that helps here.