LCDDemo - writestr
babinda01
Posts: 54
Hi
Could someone please point me in the right direction here, I am going nuts trying to figure this out - and I can't afford to go any more crazy.
I am using the LCDDemo from the object exchange, and I am trying to use the writestr command to display a variable on my LCD like this -·lcd.writestr(ch),
but my problem is that I need to have a "carrage return" and an "end of string" put onto this variable to make it legible, I just can't seem to get it to work.·
If I use a constant ie lcd.writestr(string("Hello", cr , eos)), this works fine.
repeat
if ser.rxcheck
······ ch:=ser.rx
······· 'ser.tx(ch)
······ lcd.pos (1,1)
······ lcd.writestr(string("X:", eos)
······ lcd.pos(1,8)
······ lcd.writestr(ch)····· 'it works up to this point, but when I add this line the display is as crazy as I am.
Regards
Andrew
·
Could someone please point me in the right direction here, I am going nuts trying to figure this out - and I can't afford to go any more crazy.
I am using the LCDDemo from the object exchange, and I am trying to use the writestr command to display a variable on my LCD like this -·lcd.writestr(ch),
but my problem is that I need to have a "carrage return" and an "end of string" put onto this variable to make it legible, I just can't seem to get it to work.·
If I use a constant ie lcd.writestr(string("Hello", cr , eos)), this works fine.
repeat
if ser.rxcheck
······ ch:=ser.rx
······· 'ser.tx(ch)
······ lcd.pos (1,1)
······ lcd.writestr(string("X:", eos)
······ lcd.pos(1,8)
······ lcd.writestr(ch)····· 'it works up to this point, but when I add this line the display is as crazy as I am.
Regards
Andrew
·
Comments
lcd.out() or similar.
Short of that you can take the nasty way out and try
lcd.writestr(string(ch))
I'd have a look at the object and find the routine that lcd.writestr() uses to output a single character at a time (after all, it has to!)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pull my finger!