Streams and Com Ports!

BlitzMax Forums/BlitzMax Programming/Streams and Com Ports!

Yeshu777(Posted 2010) [#1]
Ok, next problem!

I want to open a stream to /dev/ttyS0

eg.

com = OpenStream("/dev/ttyS0", True, True);

I want to print a a sting recieved from the serial port..

eg.
buf$ = ReadString(com);

Am I on the right track here?

Any *pointers in the right direction appreciated.

BMax Linux 1.36


Brucey(Posted 2010) [#2]
Is it really a String, or is it a sequence of characters?


Yeshu777(Posted 2010) [#3]
I check that com <> 0, seems quite happy with this, so I guess the stream has been opened ok.

I just need an example of sending and recieving characters to the stream..

eg.

com = OpenStream("/dev/ttyS0", True, True)';

If(com <> 0) Then
WriteString("init", com)';
End If

Edit:

Working!.. got it eventually.


Czar Flavius(Posted 2010) [#4]
Is it really a String, or is it a sequence of characters?
There's a difference???????