dbrgn / RPLCD

A Raspberry Pi LCD library for the widely used Hitachi HD44780 controller, written in Python. GPIO (parallel) and I²C modes supported.
https://rplcd.readthedocs.io/en/latest/
MIT License
261 stars 72 forks source link

Could not display degree sign #128

Closed daqingli616 closed 5 months ago

daqingli616 commented 3 years ago

It seems that the latest version driver could not display the degree sign anymore. The following string can be printed out normally but could only display on LCD16x2 with degree sign missing.

uString = 'Temp: 30' + u'\N{DEGREE SIGN}' + 'C" print (uString) shows: Temp: 30°C

lcd.write_string(uString) only display: Temp: 30 C

The test was done on a Raspberry 4 inside Python 3.7.3

dbrgn commented 3 years ago

If you write "anymore", does that mean that it worked on a previous version? If yes, which version works and which version does not?

daqingli616 commented 3 years ago

Hi,

No, I did not get it to work. I saw a youtube video to demo its working but it was published in 2016 and with the uchar(233) method. But that's with Python2 and as Python3 changed uchar() to char() and I tried to use char(233) but could not even print a degree sign. I found out how to print out a degree sign from online search with this u'\N{DEGREE SIGN}' method but now I could print the degree sign inside a string and still the LCD could not display it.

Thanks,

On Mon, Sep 6, 2021 at 10:53 AM Danilo Bargen @.***> wrote:

If you write "anymore", does that mean that it worked on a previous version? If yes, which version works and which version does not?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dbrgn/RPLCD/issues/128#issuecomment-913706528, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEEBASLEKUNIU6EGXNJCBTLUATIVBANCNFSM5DQRWC4A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

dbrgn commented 3 years ago

That depends on the character map of your LCD. Did you see https://rplcd.readthedocs.io/en/latest/usage.html#character-maps?

daqingli616 commented 3 years ago

Hi,

After I add the charmap = 'A00' in my code, the degree sign shows up.

Thanks,

Daqing

On Mon, Sep 6, 2021 at 2:06 PM Danilo Bargen @.***> wrote:

That depends on the character map of your LCD. Did you see https://rplcd.readthedocs.io/en/latest/usage.html#character-maps?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dbrgn/RPLCD/issues/128#issuecomment-913796100, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEEBASNFAECJCQH43QZBIM3UAT7L3ANCNFSM5DQRWC4A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.