I have one of these:
It is a 2 x 16 LCD display.
There is a node for it and I made it better in that you can specify where on the display the message is set.
This is the basis of a new project I am about to start which may seem over the top, but hey..... I am wanting to give it a go.
I think I have found a 3.3v display and a compatible SPI
bus driver for it. (Less pins used on the RasPi.)
The thing is I can't send a :
to be displayed.
I am wanting to display a :
and a /
and a few other special characters.
I can understand that some characters are special and need to be handled differently.
Anyway, if I send a message hello world
all I see on the display is hello
. The world
part is negated - probably because of the
(space).
No big. I send it "hello world"
and I see the message hello world
. Great.
But if I then send it "hellow:world"
all I see is hello
again.
This is using the code supplied with the node.
#
import pifacecad
import sys
try:
x = sys.argv[1].split(",")
y = x[1].split(":")
except:
raise TypeError("The entered text is not correct")
cad = pifacecad.PiFaceCAD()
cad.lcd.backlight_on()
cad.lcd.cursor_off()
cad.lcd.set_cursor (int(x[0])-1, int(y[0])-1)
if (y[1]):
cad.lcd.write(y[1])
cad.lcd.blink_off()
# cad.lcd.write(unicode(text))
else:
cad.lcd.clear()
This code - however - displays the :
in the message.
#!/usr/bin/env python3
import sys
import pifacecad
#print('Arguments:', len(sys.argv))
#print('List:', str(sys.argv))
#if sys.argv < 2:
# print('Too few arguments, please specify a filename')
filename = sys.argv[1]
print('The paramater you entered is called')
print( filename)
cad = pifacecad.PiFaceCAD()
cad.lcd.backlight_on()
cad.lcd.clear()
cad.lcd.write(filename)
I shall sit down and try to work out what is going on, but as far as I can see, they are both using this piface
thing at the start to display the message.
And they are both using:
cad.lcd.write(
to write to the screen/display.
So I at a loss to see what is going on and why.
If someone is feeling kind. A bit of help would be appreciated.