Don't expect the data to arrive immediately.
Yes, I was aware of that, but that probably is not to be the reason for the problem:
The µC sends data steadily (20/s). When the app is started, there is apparently data in some buffer (I don't know where that is located). Accordingly the B4J app plots this buffered data very fast and the plot does not reflect the
current values the µC is sending -the plot is "dead" for a while (the same with B4A). When the buffer is becoming empty,the plotting speed is reduced as it should and the plot "immediately" responds to changed data sent from the µC.
I tried to empty the B4J-buffer by using purge, but that does not change the situation.
sp1.Open("COM7")
sp1.Initialize("")
sp1.SetParams(921600,8,1,0) 'the baud rate is unimportant here because of BT
astream1.Initialize(Me, "astream1",sp1.GetInputStream, sp1.GetOutputStream)
sp1.purgeport(8)
Therefore I tried to measure the speed of the incoming data to suspend the plot until the buffer is empty.
I think when the data are retrieved from the buffer faster than they are coming in we can watch them in "real time" on that time scale. The problem is to empty the buffer or to find a way to know that "ancient" data are being processed. The latter I tried by measuring the speed of data seen by Asyncstreams -with limited success.