arginine
Posts: 33
Joined: Sun May 12, 2013 7:19 pm

LCD, celcius degree character … and chr(223) not working

Mon Apr 07, 2014 10:57 pm

Hello,

I did setup a 20x4 lcd on a RPI using RPLCD library (https://github.com/dbrgn/RPLCD) for the LCD display.
I am having problem for displaying the celcius degree ( ° ) character on the LCD:
using ° or chr(223) i end up with no display of the ° symbol and the following error message :

UnicodeDecodeError: 'ascii' codec can't decode byte 0xdf in position 0: ordinal not in range(128)

hum, not the most explicit error message … I google it ("with lcd at the end") and I found only 5 hits, this link is the most interesting http://www.raspberrypi.org/forums/viewt ... 1&p=511581

Any suggestions or help would be welcome (I understand the error but I have no clue where to look in first)

Francis

User avatar
DougieLawson
Posts: 40833
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: LCD, celcius degree character … and chr(223) not working

Mon Apr 07, 2014 11:15 pm

Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

arginine
Posts: 33
Joined: Sun May 12, 2013 7:19 pm

Re: LCD, celcius degree character … and chr(223) not working

Mon Apr 07, 2014 11:21 pm

Thanks for the link, I also found it and read it (this is from where I tried chr(223) … without success)

User avatar
DougieLawson
Posts: 40833
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: LCD, celcius degree character … and chr(223) not working

Mon Apr 07, 2014 11:28 pm

Try chr(176)
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

arginine
Posts: 33
Joined: Sun May 12, 2013 7:19 pm

Re: LCD, celcius degree character … and chr(223) not working

Mon Apr 07, 2014 11:39 pm

DougieLawson wrote:Try chr(176)
also tried it (chr(176) was also suggested in the post) … same error :-(

I even tried to make a "custom celcius symbol", inspired from http://forums.adafruit.com/viewtopic.php?f=47&t=38623 (arduino) but I got "AttributeError: 'CharLCD' object has no attribute 'createChar'" …. still looking for this 'CreateChar' thing.

User avatar
Douglas6
Posts: 4995
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: LCD, celcius degree character … and chr(223) not working

Mon Apr 07, 2014 11:51 pm

Nope, I think you'll have to create a custom character. See this post in the thread you linked. It's not difficult, but doesn't look like your python module makes it easy either. There's some python code in the Adafruit Adafruit_CharLCDPlate.py, createChar(). To create a bitmap, this site is useful.

You'll need your own creatChar function based on the Adafruit one.

User avatar
dbrgn
Posts: 19
Joined: Sat May 11, 2013 2:49 pm
Location: Switzerland
Contact: Website

Re: LCD, celcius degree character … and chr(223) not working

Tue Apr 08, 2014 12:04 am

Hi arginine

First of all, regarding encoding problems in general, I strongly recommend reading & fully understanding this: http://www.joelonsoftware.com/articles/Unicode.html This will help you immensely when dealing with unicode vs encoded text :) And if you've still got some time left, this is also incredibly helpful: http://nedbatchelder.com/text/unipain.html

Anyways, regarding the error, I couldn't quite find the line in the sourcecode that causes the problem (and I don't have my display around to test atm). According to the error message it is not an encoding problem when sending it to the device, but a decoding problem because you're using a unicode string in a place where it's implicitly converted to an ascii bytestring. Do you have a full traceback available, so I can see the line of code where it occurs? And are you using Python 2 or 3?

I'm not 100% sure if the character map of your display already contains the degree symbol. But as far as I know it does. It depends on the internal character map of your LCD, which is not always the same across different HD44780 displays. I'll probably find time on Thursday evening to re-wire my LCD and test this issue. In the meantime, feel free to report any other issues you find with the display (preferrably in the Github issue tracker).
I even tried to make a "custom celcius symbol", inspired from http://forums.adafruit.com/viewtopic.php?f=47&t=38623 (arduino) but I got "AttributeError: 'CharLCD' object has no attribute 'createChar'" …. still looking for this 'CreateChar' thing.
Unfortunately adding custom characters is not yet implemented as a high level function. You could send the raw commands directly through the lcd.command() method though: https://github.com/dbrgn/RPLCD/blob/mas ... #L391-L393

User avatar
jackokring
Posts: 818
Joined: Tue Jul 31, 2012 8:27 am
Location: London, UK
Contact: ICQ

Re: LCD, celcius degree character … and chr(223) not working

Tue Apr 08, 2014 7:00 am

The problem stems from Unicode encoding. Values above 127 are encoded in more than one byte in Unicode UTF-8. The LCD requires single byte display codes. Thus to print a single character with an index above 127, it requires some non Unicode method of sending bytes to the display. there is no workaround using Unicode. Due to the way 2 byte and higher character codes are encoded it is possible to print some of the characters in the high range. (DF = hex degree char in extended display ascii)

110xxxxx 10xxxxxx
11011111 1010000 = code point 1111110000 = 1008 decimal

This character if you add it to a string should print the degree followed by a space. Thay's about the best thats possible without direct byte writing.
Pi[NFA]=B256R0USB CL4SD8GB Raspbian Stock.
Pi[Work]=A+256 CL4SD8GB Raspbian Stock.
My favourite constant 1.65056745028

User avatar
dbrgn
Posts: 19
Joined: Sat May 11, 2013 2:49 pm
Location: Switzerland
Contact: Website

Re: LCD, celcius degree character … and chr(223) not working

Tue Apr 08, 2014 9:34 am

jackokring wrote:The problem stems from Unicode encoding. Values above 127 are encoded in more than one byte in Unicode UTF-8. The LCD requires single byte display codes. Thus to print a single character with an index above 127, it requires some non Unicode method of sending bytes to the display.
Exactly, that's why there are different encodings. UTF-8 ist *not* Unicode, it's just another encoding. Encodings like ISO-8859-1 (latin1) can encode up to 256 characters. In Python when I'm referring to Unicode strings I'm not talking about UTF-8 (which would be a bytestring), but rather about a list of codepoints that can be encoded however you like. The default/implicit encoding used is ASCII which does not contain the degree symbol. The question now is which exact codepage (if any) the LCD is using. Then you can use that codepage with the Python .encode() method. (Or rather, I'll incorporate the encoding directly into the library.)

User avatar
dbrgn
Posts: 19
Joined: Sat May 11, 2013 2:49 pm
Location: Switzerland
Contact: Website

Re: LCD, celcius degree character … and chr(223) not working

Sat Apr 19, 2014 9:58 pm

I just pushed a few new commits to the project. One of the changes is a new script called show_charmap.py that writes all supported characters to the LCD so you can find the correct chr()/unichr() value. I also enhanced the documentation in this regard, there is a new section in the README called "Writing Special Characters".

Regarding the degree sign, simply use unichr(176) in Python 2 (or chr(176) in Python 3) to create the unicode character representing the degree symbol on your LCD (at least that's the number that works on mine). It's important that you only pass unicode strings to the write_string() method. Example:

Code: Select all

lcd.write_string(u'Temperature: 20' + unichr(179) + 'C')
Another change is that all external dependencies (RPIO and flufl.enum) are removed now.

I also adjusted the tests and added the degree symbol to one of the outputs. I'd be glad if you'd test those changes and give me feedback whether everything works as expected.

Danilo

User avatar
jojopi
Posts: 3424
Joined: Tue Oct 11, 2011 8:38 pm

Re: LCD, celcius degree character … and chr(223) not working

Sun Apr 20, 2014 1:44 am

dbrgn wrote:Regarding the degree sign, simply use unichr(176) in Python 2 (or chr(176) in Python 3) to create the unicode character representing the degree symbol on your LCD (at least that's the number that works on mine). It's important that you only pass unicode strings to the write_string() method.
This seems a highly misleading interface. You ask for a unicode string, but you admit that the code points do not match those of Unicode. Furthermore, you are only actually using the low eight bits of each character. For both reasons, what you really wanted was a bytes string like b"20\xb0C". (I am aware that this slightly complicates portability, because such a string contains integers in Python3, but characters in Python2.)

Or is the intention to have write_string() handle Unicode in future, and do its own equivalent of .encode("HD44780-A0x") before output? I suspect there may be too many non-standard variants for that to be practical.

User avatar
dbrgn
Posts: 19
Joined: Sat May 11, 2013 2:49 pm
Location: Switzerland
Contact: Website

Re: LCD, celcius degree character … and chr(223) not working

Sun Apr 20, 2014 12:22 pm

jojopi wrote:This seems a highly misleading interface. You ask for a unicode string, but you admit that the code points do not match those of Unicode. Furthermore, you are only actually using the low eight bits of each character. For both reasons, what you really wanted was a bytes string like b"20\xb0C". (I am aware that this slightly complicates portability, because such a string contains integers in Python3, but characters in Python2.)
I'm simply relying on the output of the `ord()` function. I don't think that function cuts the high bits. As far as I know, it just converts the character to the integer representation of the code point.

I've thought a lot about how to handle bytestrings vs unicode... It's quite hard, because neither ISO-8859-1 bytestrings nor ASCII bytestrings nor UTF-8 map cleanly to the display. But as the letters and many of the punctuation symbols match the positions in the ASCII / ISO-8859-1 encodings, it's more convenient to write strings to the display than a list of integers. Do you think I should change that?

The advantage of unicode objects is that you have clearly defined codepoints without any encoding (which sometimes don't match the LCD's internal characters). Which brings me to the next point:
jojopi wrote:Or is the intention to have write_string() handle Unicode in future, and do its own equivalent of .encode("HD44780-A0x") before output? I suspect there may be too many non-standard variants for that to be practical.
That would certainly be the ideal situation, to provide a custom codec/encoding for the controller. But as far as I know the character maps aren't standardized enough for this to be useful. At least the character map on my LCD does not match the two versions in the datasheet (which contains both european and kanji variants). And simply using bytestrings with the LCD values isn't very useful if the strings cannot be printed in standard Python.

If you have an idea on how to implement this cleanly, I'm very open to feedback :)

User avatar
jojopi
Posts: 3424
Joined: Tue Oct 11, 2011 8:38 pm

Re: LCD, celcius degree character … and chr(223) not working

Sun Apr 20, 2014 4:02 pm

dbrgn wrote:I'm simply relying on the output of the `ord()` function. I don't think that function cuts the high bits. As far as I know, it just converts the character to the integer representation of the code point.
ord() returns the full code points, and you use those internally. But when you come to communicate with the display you send either 8 or 2×4 bits, so I think the codes are silently taken modulo 256. Normally when converting from Unicode to bytes with encode(), unrepresentable characters would throw an exception, be ignored, or replaced by "?".

I think I really would have written the method to take a bytes string. That is "correct" because the display literally takes bytes and the interpretation of them is uncertain and not clearly related to Unicode beyond ASCII. However, it would not have been very Pythonic. Especially in Python3, where beginners are taught that all strings are Unicode, and bytes exist only at the very edges, often inside libraries. Also, users who want to write integer bytes can just loop over write(), which is already necessary to get at the glyphs for "\r\n".

So perhaps the best solution is to keep the Unicode interface of write_string(), and add an explicit encode("iso-8859-1", "replace") inside. That makes a proper distinction between Unicode and bytes, and substitutes characters that are out of range. It continues to assume that the display's font is similar to latin1, but that is still over 70% true in at least one common group of variants.

This continues to allow the end user to fudge less standard displays using explicit unichr()/chr(), because Unicode and Latin1 are identical for the first 256 code points. It continues to allow adding additional mapping options in future, as long as Latin1 remains the default.

User avatar
dbrgn
Posts: 19
Joined: Sat May 11, 2013 2:49 pm
Location: Switzerland
Contact: Website

Re: LCD, celcius degree character … and chr(223) not working

Sun Apr 20, 2014 8:46 pm

Thanks jojopi, useful advice! The only thing that bothers me is that I'd have to tell people to encode their unicode strings (default in py3, so that's the use case I'm mainly thinking about) to ISO-8859-1, only to find that the encoding is still not correct and needs replacement of certain characters...

Do you know how similar/different the character maps among the different versions of the LCD are? Maybe there are 3, 4 versions that make up a very big part of all the LCDs, then we could simply provide those different encodings for the encode() method.

I added a Github issue for this, if you have an account you may also answer there: https://github.com/dbrgn/RPLCD/issues/15

arginine
Posts: 33
Joined: Sun May 12, 2013 7:19 pm

Re: LCD, celcius degree character … and chr(223) not working

Sun Apr 27, 2014 3:24 pm

Hello Danilo,

Thanks for this update ! while reading your updated document ion and this post, I understood that encoding is important.

I'm sure your library is working but I got some "not well configured/python/encoding" mistakes. To illustrate my issue, please read below. I installed python on the top of Volumio Hifi distribution (http://volumio.org, Linux volumio 3.10.30+ #650 PREEMPT Wed Mar 5 14:33:42 GMT 2014 armv6l GNU/Linux) following these commands :

Code: Select all

apt-get update
apt-get install python-dev
apt-get install python-setuptools
easy_install -U distribute
apt-get install python-pip
pip install rpi.gpio
apt-get install git
in /etc I have python 2.6 and 2.7 folders
RPLCD is installed (via sudo pip install RPLCD) in /usr/local/lib/python2.7/dist-packages/RPLCD (and I check : it is your updated library, by nano lcd.py : there is the section with the ° character)

Testing your test_20x4lcd.py script :
running first time I got :

Code: Select all

./test_20x4.py: line 2: from: command not found, ./test_20x4.py: line 4: import: command not found
./test_20x4.py: line 6: from: command not found, ./test_20x4.py: line 7: from: command not found
ect ect
I add #!/usr/bin/python on the top of the file (just before # -*- coding: utf-8 -*-) and it work until :

1) Display the temperature in Paris & Zurich : problem with displaying ü and ° characters : (nothing for ü and - for °)
2) then File "./test_20x4.py", line 113, in <module>
lcd.create_char(0, sad), AttributeError: 'CharLCD' object has no attribute 'create_char'

I did also make some tests with chr(176) or unichr (179) … never got to get this damned ° characters displaying:.
unichr(176) ---> is displaying -
unichr(179) ---> is displaying a sort a big comma
chr(176) ----> UnicodeDecodeError: 'ascii' codec can't decode byte 0xb0 in position 0: ordinal not in range(128)
chr(179) ----> UnicodeDecodeError: 'ascii' codec can't decode byte 0xb3 in position 0: ordinal not in range(128)

I would guess there is sth not well configured with "encoding" or with python (is it sty related to #!/usr/bin/python that I put on the top of the scripts ?).

Possibly you can help me to find out ?

ps : while reading your posts I was also wondering what the 'u' stands for ?
exemple (the u before temperature)

Code: Select all

lcd.write_string(u'Temperature: 20' + unichr(179) + 'C')

Francis

User avatar
Douglas6
Posts: 4995
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: LCD, celcius degree character … and chr(223) not working

Sun Apr 27, 2014 4:40 pm

The u'' is for creating unicode characters. In this case, I think unicode is something of a red herring. The HD44780 has character patterns hard-coded into its ROM, with its own proprietary mapping that only partially overlaps ASCII mappings. If the character you need is not programmed into ROM, it doesn't matter which code you give it; you can't generate it (but see below). The HD44780 is sold in at least two versions, one with an 'A00' character set, one with an 'A02' set. See the datasheet for the characters included in each set. In the 'A02' set, code 176 is the degrees symbol. In the 'A00' set, code 176 is a 'high dash' symbol that you are seeing. So I'm guessing you have the 'A00' version. This character set does not have a degrees symbol anywhere, so again, it matters not what encoding you use, the chip cannot generate it.

UNLESS you program your own character pattern into RAM. The HD44780 will let you program up to eight (?) custom character patterns. My previous post gave some hints on how to do that. It's not hard to do. You might want to look into that approach.
Last edited by Douglas6 on Sun Apr 27, 2014 5:22 pm, edited 1 time in total.

User avatar
DougieLawson
Posts: 40833
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: LCD, celcius degree character … and chr(223) not working

Sun Apr 27, 2014 5:12 pm

You could use createChar() to define a custom made character in CGRAM.

degree = [0xe,0xa,0xe,0x0,0x0,0x0,0x0,0x00] (or something like that)
Send a 0x40 command (to define chr(0)) then the eight bytes to define the character. Send 0x00 as data to display it.

Send a command value from 0x40 to 0x47 to define up to eight chars, they are displayed with chr(0) 0x00 to chr(7) 0x07

There is a degree at 0x1101111 chr(223) in the Japanese A00 ROM, I've not found it in the US A02 ROM (0x10110111???)

Here's an example using the PiFaceCAD c/c++ library

Code: Select all

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "pifacecad.h"

void wait_for_enter(const char * message)
{
    printf("%s", message);
    while (getchar() != '\n');
}


int main () {

    uint8_t loc0 = 0;
    uint8_t loc1 = 1;
    uint8_t degree[]={0x0e,0x0a,0x0e,0x00,0x00,0x00,0x00,0x00};
    uint8_t creeper[]={0x00,0x1b,0x1b,0x04,0x0e,0x0a,0x00,0x00};
    char * zeros;

    pifacecad_open();
    pifacecad_lcd_blink_off();
    pifacecad_lcd_cursor_off();
    pifacecad_lcd_store_custom_bitmap(loc0, degree);
    pifacecad_lcd_store_custom_bitmap(loc1, creeper);
    pifacecad_lcd_write("3..2..1..Go!");
    wait_for_enter("Go");
    pifacecad_lcd_clear();
    for (int i=0;i<5;i++) {
       pifacecad_lcd_write_custom_bitmap(loc0);
       pifacecad_lcd_write_custom_bitmap(loc1);
    }
    wait_for_enter("look");
    pifacecad_lcd_clear();
    pifacecad_lcd_backlight_off();
    pifacecad_lcd_display_off();
    pifacecad_close();
}
Last edited by DougieLawson on Sun Apr 27, 2014 6:00 pm, edited 1 time in total.
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

arginine
Posts: 33
Joined: Sun May 12, 2013 7:19 pm

Re: LCD, celcius degree character … and chr(223) not working

Sun Apr 27, 2014 5:59 pm

Hello Douglas,

Thanks for replying and for your explanation regrading the LCD version AO2 and AOO. Seems like that I have a A00 version.
I (re)read the link you suggested before (http://forums.adafruit.com/viewtopic.php?f=47&t=38623).

Yes, I should be able tp display the degree symbol using the lcd.create.char feature (https://omerk.github.io/lcdchargen/) I end up with a lcd.create_char(0, sad), AttributeError: 'CharLCD' object has no attribute 'create_char' error :-(

ps : is there a "software" command to determine the LCD version (A02 or A00) ? (depending from where you buy your LCD, i'm not sure about the robustness of their data sheets)

F

User avatar
DougieLawson
Posts: 40833
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: LCD, celcius degree character … and chr(223) not working

Sun Apr 27, 2014 6:09 pm

arginine wrote:ps : is there a "software" command to determine the LCD version (A02 or A00) ? (depending from where you buy your LCD, i'm not sure about the robustness of their data sheets)
There's no function code available to determine that in your programs.

https://www.sparkfun.com/datasheets/LCD/HD44780.pdf is a reliable link to the Hitachi datasheet.
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

User avatar
Douglas6
Posts: 4995
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: LCD, celcius degree character … and chr(223) not working

Sun Apr 27, 2014 6:19 pm

I'm not sure about a command to directly determine the character patterns on the chip. It looks like dbrgn recently included a show_charmap.py script that could be useful. The HD44780 has a lot of knock-offs that could have their own ROMs.
If dbrgn has not provided a create_char() function, you'll need to write your own using examples from the Adafruit module, numerous Arduino examples, or indeed the psuedo-code DougieLawson mentioned above.

(@DougieLawson: love the creeper!)

User avatar
Douglas6
Posts: 4995
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: LCD, celcius degree character … and chr(223) not working

Sun Apr 27, 2014 6:42 pm

I just took a look at dbrgn's RPLCD Github, and the README does describe a create_char() funtion, so make sure you have his latest version of RPLCD (I believe that's the library you are using?)

User avatar
dbrgn
Posts: 19
Joined: Sat May 11, 2013 2:49 pm
Location: Switzerland
Contact: Website

Re: LCD, celcius degree character … and chr(223) not working

Sun Apr 27, 2014 9:28 pm

Hi guys

Thanks for the valuable feedback.
arginine wrote:Testing your test_20x4lcd.py script :
running first time I got :

./test_20x4.py: line 2: from: command not found, ./test_20x4.py: line 4: import: command not found
./test_20x4.py: line 6: from: command not found, ./test_20x4.py: line 7: from: command not found
ect ect
The test scripts are not really meant to be executed directly, rather call them with Python: `python /path/to/test_20x4.py`. Adding the shebang line (the part with `#!/usr/bin/env python`) implicitly does the same thing though. I just added it to the test scripts as default, so calling them directly should work from now on.
Douglas6 wrote:The HD44780 is sold in at least two versions, one with an 'A00' character set, one with an 'A02' set.
Do you know whether that counts for the majority of all HD44780 based displays? In that case I'll probably add the two character maps to the library, so you can use ".encode('hd44780-a0')" and ".encode('hd44780-a2')" to encode unicode strings.
arginine wrote:Yes, I should be able tp display the degree symbol using the lcd.create.char feature (https://omerk.github.io/lcdchargen/) I end up with a lcd.create_char(0, sad), AttributeError: 'CharLCD' object has no attribute 'create_char' error
I just implemented the custom characters feature very recently, so it's not on PyPI yet (meaning that you don't get that feature when installing via pip). You can install the current development version though: "pip install -e git+https://github.com/dbrgn/RPLCD#egg=RPLCD" (Or you can clone the code, change into the main directory and run "python setup.py install".)

To see the documentation on how to create custom chars, seee https://github.com/dbrgn/RPLCD#custom-characters.

There is also a section that talks about how to write special characters (like the degree symbol) to the display: https://github.com/dbrgn/RPLCD#writing- ... characters It also talks about the "show_charmap.py" script, which will help you to find out the position of the character.

I'd like to find a solution for the encoding issues before uploading a new release to PyPI. Unicode is not really a good solution because the Unicode codepoints don't map to the real display encoding. The two charmaps mentioned by Douglas6 above could solve most of the issues.

arginine
Posts: 33
Joined: Sun May 12, 2013 7:19 pm

Re: LCD, celcius degree character … and chr(223) not working

Sun Apr 27, 2014 10:03 pm

Douglas6 wrote:I just took a look at dbrgn's RPLCD Github, and the README does describe a create_char() funtion, so make sure you have his latest version of RPLCD (I believe that's the library you are using?)
Oh, thanks for pointing this out, I deeply check
apparently pip install RPLCD or pip install RPLCD -- upgrade does not install the last RPLCD version.

tried manual install sudo python setup.py install but this, apparently, make the installation in the current folder and not in /usr/local/lib/python2.7/dist-packages/RPLCD (as pip install RPLCD would make it)

does it mean that I have to run sudo python setup.py install in /usr/local/lib/python2.7/dist-packages/RPLCD ??

Btw, the create_Char feature is now there and running the test script test_20x4.py works !!!!
thanks to danilo, douglas and all the others contributors to this thread !

EDIT : oh, just see the POST from danilo now :-) … should have made a refresh of the thread before posting :-)
EDIT 2 : i run pip install -e git+https://github.com/dbrgn/RPLCD#egg=RPLCD in /usr/local/lib/python2.7/dist-packages/RPLCD to mimic pip install. Everything works great. Let me know when you will update the pip stuff.

User avatar
Douglas6
Posts: 4995
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: LCD, celcius degree character … and chr(223) not working

Sun Apr 27, 2014 11:03 pm

dbrgn wrote:Do you know whether that counts for the majority of all HD44780 based displays?
I'm honestly just guessing based on the Hitachi datasheet, but I'd think those two mappings would account for the great majority of HD44780 chips hobbyists are likely to run across.

User avatar
dbrgn
Posts: 19
Joined: Sat May 11, 2013 2:49 pm
Location: Switzerland
Contact: Website

Re: LCD, celcius degree character … and chr(223) not working

Tue Apr 07, 2015 8:47 am

> Let me know when you will update the pip stuff.

This is an old thread, but just for the record, a version containing the fixes was released in July last year.

Return to “Graphics, sound and multimedia”