John Hagan wrote:...but I am picking up a random first character that gets posted to the PC console on the return message. Can you help me find out where this is coming from?
I honestly don't know, but I wonder if it might be a
byte order mark.
I've never used Lego, but from a quick glance at the
NXTComm docs (I assume I'm looking at the right one), it doesn't appear to require a DataInputStream; and since you're only sending text, I'm wondering why you chose it.
If it were me, I think I'd want to use a BufferedReader, possibly with a specific
Charset like UTF-8. That way, you don't have to write your own
readline() method, because BufferedReader already has one, and BOMs (if sent/received) would be handled internally.
However, as I say, I've never used Lego, so there may be other things going on that I don't understand.
Winston