Length is negative -1

image
Same as in topic lgth is negative, i tried printing it out in label but it was not (it was equal 0).

Text recived by bluetooth is: ,angle(space)
timer interval is set to 50ms, bluetooth data interval is set to 50ms as well.

Dear @Nikodem_Przybyla,
please take a look here:

and change the incoming BT data check accordingly (i.e. -1 instead of ByteAvailableToReceive and annexed stuff).
In addition to this your polling rate on AI2 app shall be double than the sending rate from Arduino, otherwise you run the risk to miss data, or to mix them up. So, the polling rate rule of thumb is: AI2 polling = 2*Tx rate (or in other words, polling period = 1/2 of TX period : if Arduino sends @50 ms, your app shall poll @25ms).
Best wishes.

Problem solved timer didnt catch up to the speed of transfering data from esp board, thanks for your time

1 Like

Glad it worked ! :hugs:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.