B4R Question AsyncStreams in Prefix mode

TomKluz

Active Member
Licensed User
Hello,
I have made an arduino device and have wrote a software in native arduino before I have found B4X community. Recently I am trying to create android app using Bluetooth data from arduino
unit and also sending some commands.
Data from Arduino unit are coming in text format. I just send strings by Serial.println(string). On the other site I use AsyncStreamText Class to read it but unfortunatelly sometimes some data are missing.
I am thinking about AsyncStreams in Prefix mode. Maybe it should be more accurate ?
If sa I have to send data from arduino unit in this format .
Is it possible to 'simulate' asyncstreams in prefix mode format using nativ arduino ?

Kind regards
TomKluz
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Best solution is to use prefix mode with B4RSerializator.


Is it possible to 'simulate' asyncstreams in prefix mode format using nativ arduino ?
It will probably be easier to integrate the native as inline code in your B4R code.
 
Upvote 0

TomKluz

Active Member
Licensed User
Hello,
Thank you for a fair answer. I was thinking to re-write everything from native Arduino to B4R but:
- it is a big job, takes much time,
- I afraid about libraries I am using in Arduino (Nokia5110, MPU6050, I2C, SPI).

Perhaps it is possible, but for now I would like to use time to make better B4A software, which uses Arduinos as data source.
I have made some improvement with data reliability so ..... maybe later.
Recently will foccus on B4A thread about transmission working in background.

Thank you again for your support
TomKluz
 
Upvote 0
Top