Adafruit_CircuitPython_CharLCD
Adafruit_CircuitPython_CharLCD copied to clipboard
Could not display degree sign properly
I tried to use your driver to display a string with degree sign in it. The string I tried to display is
uString = 'Temp: 30' + u'\N{DEGREE SIGN}' + 'C' print (uString) shows: Temp: 30°C However, the following code only shows: Temp: 30-C lcd.message = uString
It is run on a Raspberry PI4 with latest Raspbian and python 3.7.3.
there are two ways for degree sign
- use default character in its RAM, actually it is
0xDF, see https://mil.ufl.edu/3744/docs/lcdmanual/characterset.html, it may differ for different LCD, check its datasheet - create customized characters, code like https://github.com/adafruit/Adafruit_CircuitPython_CharLCD/blob/main/examples/charlcd_customcharacter.py