Hello All,
I have a couple of newbie questions, hoping there is a simple answer. I'm sending formatted text over a Bluetooth link and I found something I can't explain:
Method 1:
Textwriter1.Write("This is a Test" & CRLF)
That works, but it only gives me a LF, no CR
Method 2:
Textwriter1.Writeline("This is a Test")
This works, but same result as above, no LF
Method 3:
Textwriter1.Write("This is a Test" & CHR(10) & CHR(13))
This works nicely as intended, CRLF at the end of the line. Am I doing something wrong?
One more thing, I could not find any examples of how to use AsyncStreams with Serial connections (for example serial connected to Bluetooth). I found lots of examples with TCP connections binding to a socket, like Server.Initialize(port, "Server"), Server.Listen, then wait for the Server_NewConnection to get a new socket to connect to. What is the syntax to bind a Socket to a serial stream? Or are Sockets not even used, something direct like:
AStreams.InitializePrefix(Serial1.InputStream, False, Serial1.OutputStream, "AStreams")
Thank you!
Steve
I have a couple of newbie questions, hoping there is a simple answer. I'm sending formatted text over a Bluetooth link and I found something I can't explain:
Method 1:
Textwriter1.Write("This is a Test" & CRLF)
That works, but it only gives me a LF, no CR
Method 2:
Textwriter1.Writeline("This is a Test")
This works, but same result as above, no LF
Method 3:
Textwriter1.Write("This is a Test" & CHR(10) & CHR(13))
This works nicely as intended, CRLF at the end of the line. Am I doing something wrong?
One more thing, I could not find any examples of how to use AsyncStreams with Serial connections (for example serial connected to Bluetooth). I found lots of examples with TCP connections binding to a socket, like Server.Initialize(port, "Server"), Server.Listen, then wait for the Server_NewConnection to get a new socket to connect to. What is the syntax to bind a Socket to a serial stream? Or are Sockets not even used, something direct like:
AStreams.InitializePrefix(Serial1.InputStream, False, Serial1.OutputStream, "AStreams")
Thank you!
Steve