I try to define a new character (a capital german umlaut "Ä") on my 2004 lcd on a raspberry pi using wiringPi's lcdCharDef()
This is my code
import wiringpi2 as wiringpi
# Ä
cap_umlaut_a = [
int('0b01010', 2),
int('0b00100', 2),
int('0b01010', 2),
int('0b10001', 2),
int('0b11111', 2),
int('0b10001', 2),
int('0b10001', 2),
int('0b00000', 2)
]
print(cap_umlaut_a) # [10, 4, 10, 17, 31, 17, 17, 0]
wiringpi.lcdCharDef(lcd_handle, 0, cap_umlaut_a)
When I run this code I get the following error:
TypeError: in method 'lcdCharDef', argument 3 of type 'unsigned char [8]'
I expected these ints
to be the same as unsigned chars
[edit]
In a different part of the code I use ord(char)
to convert only one character to an unsigned int. Can this lead to the correct anser?
How can I cast/convert the array to a type that can be accepted?
P.S. (Note that (as far as I understand it) the python wiringPi library simply wraps the C functions of wiringPi)
[edit]
I opened an issue on github: https://github.com/WiringPi/WiringPi2-Python/issues/20