Screen formatting with Parallax Serial Terminal
Don M
Posts: 1,653
Lets say I have 2 messages to print on the terminal screen. I would use:
term.str(string("This message 1 here"))
term.str(string("This message 2 there"))
How do I send the "cursor XY" command to PST so that I can have message 1 in a specific location and message 2 in its specific location?
I know that the CRSRXY command to PST is 2 but I can't figure out how to send 2,0,2 (first line 2nd column) for message 1 and 2,4,2 (fifth line 2nd column) for message 2.
I tried: term.tx(2,0,2) and term.str(2,0,2) but they won't compile.
Help!
Thanks.
Don
Edit: I don't want to use the ParallaxSerialTerminal object if I don't have to. I am using FullDuplexSerialPlus object.
term.str(string("This message 1 here"))
term.str(string("This message 2 there"))
How do I send the "cursor XY" command to PST so that I can have message 1 in a specific location and message 2 in its specific location?
I know that the CRSRXY command to PST is 2 but I can't figure out how to send 2,0,2 (first line 2nd column) for message 1 and 2,4,2 (fifth line 2nd column) for message 2.
I tried: term.tx(2,0,2) and term.str(2,0,2) but they won't compile.
Help!
Thanks.
Don
Edit: I don't want to use the ParallaxSerialTerminal object if I don't have to. I am using FullDuplexSerialPlus object.
Comments
term.str(string(2, 1, 5, "Message here"))
I can enter it prior to the message.
-Phil
Addendum: You can also use the PST object's Position method to do what you want.
At the top of my programming template I have the following PST declarations:
There are others but these are the commands I routinely use.