Degrees C Symbol
richardmckenna last edited by richardmckenna
I can't seem to find the answer to this anywhere. I'm using the Arduino API and trying to display the degrees C symbol eg 5.2ºC in
M5.Lcd.printf("%0.1f%cC", temp, (char)000)but can't for the life of me find what number I need for
Can anyone help?
@richardmckenna The character " ° " is not in the range of ASCII code. So it cannot be displayed, maybe you can try to use " 'C " symbol instead, it will look more same
@m5stack hmmm ok that's a shame.
I don't suppose you can suggest any other way of displaying it? Would have thought it was a common thing to do given temperature applications are a popular thing for this kind of hardware.
Is there any documentation on what characters are available? Or is it just the standard ASCII set but not the extended set?
@richardmckenna You can refer to this Unicode example, but in fact it still does not support displaying " ° ", but will be able to display more characters. Please pay attention to the content of the notes when using.
@m5stack Thank you I will take a look.
world101 last edited by
I manually create the degree symbol by drawing a white circle and then a smaller black circle on top. But it takes some trial and error depending on your text size.
@world101 thanks. I think I will do this.