trying to get array of data from uno with hc05 to app inventor

actually i have a project that i try to send an array of data from my arduino to an app inventor through hc05 and most of it works well just 2 parts doesnt go well 1st that i get just 2 numbers of the array instead of 3 like this for ex: ,3,2 instead of 9,3,2 and idk is there an explanation for this?


The explanation is in the code that we can't see.

The code for uno:

Void sendInfo (){
Serial.println(String((int)var1) + "," + String((int)var2) + "," + String((int)var3) + "," + String((int)var4) + ","); 

And in app inv:

I begin spliting the data and then checking for every part of the data

The issue:

Is whatever order I put the vars in to be printed to the serial the first var is always missed in app inventor although when I checked in serial itself the whole vars are present.

I guess it's the rate of sending and receiving between them (timing) but not certain though

Thanks a lot


Still more code needed. But, maybe, one issue could be the usage of String objects (ref). Especially considering the fact you're playing with uno board, that have limited memory capabilities.

Just a guess... may not be related.

I don’t think so because in serial of uno it does print it well but when it goes through hc05 BT to app inv the issue occurs and instead appearing as var1, var2, var3, var4 (that’s how it appears in uno serial as intended and expected) it appears in app inv as ,var2,var3,var4 which mess up everything… all vars are whole nums if that might help. Also in app inv all I do is I split the received text with number of bytes that is available to receive at each comma. Then I begin analyzing each var to be used. Nothing too complex to show more of the code.

Thanks a lot,