Hi Erel
Your serial example works well.
I want to send and receive binary data , not text
Instead of using textwriter , and textreader to read the serial buffers
TextReader1.Initialize(Serial1.InputStream)
TextWriter1.Initialize(Serial1.OutputStream)
How do you get the data into a byte array?
I need to be able to send bytes with values from 0-0xff and the textreader/writer gets in the way
The system will be getting 34 bytes every 500 msec
Is there a length command or some way of telling how many bytes the buffer has in it?
In VB6 I would do something like this
Dim datain as variant
Dim dataout(31) as byte
If MSComm1.InBufferCount >=34 then
Datain = MSComm1.Input
I then process the data put it in the dataout buffer and return it to blue tooth
MSComm1.output = dataout
What would be a similar way in B4A?
Thanks for your help
Ken
Your serial example works well.
I want to send and receive binary data , not text
Instead of using textwriter , and textreader to read the serial buffers
TextReader1.Initialize(Serial1.InputStream)
TextWriter1.Initialize(Serial1.OutputStream)
How do you get the data into a byte array?
I need to be able to send bytes with values from 0-0xff and the textreader/writer gets in the way
The system will be getting 34 bytes every 500 msec
Is there a length command or some way of telling how many bytes the buffer has in it?
In VB6 I would do something like this
Dim datain as variant
Dim dataout(31) as byte
If MSComm1.InBufferCount >=34 then
Datain = MSComm1.Input
I then process the data put it in the dataout buffer and return it to blue tooth
MSComm1.output = dataout
What would be a similar way in B4A?
Thanks for your help
Ken