Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not display degree sign properly #65

Open
daqingli616 opened this issue Sep 6, 2021 · 1 comment
Open

Could not display degree sign properly #65

daqingli616 opened this issue Sep 6, 2021 · 1 comment

Comments

@daqingli616
Copy link

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.

@larrycai
Copy link

larrycai commented Dec 6, 2021

there are two ways for degree sign

  1. 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
  2. create customized characters, code like https://github.com/adafruit/Adafruit_CircuitPython_CharLCD/blob/main/examples/charlcd_customcharacter.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants