I am trying to send many strings in one time from java to arduino in a list of strings. but arduino cant catch them all (catched me just 3)
How can i get all the strings from java to arduino ?
Java code
chercherPort("COM11");
connecterPort();
Thread.sleep(4000);
output.write("@1#240#-120%140#120#-240@0@1#240#-120%140#120#-240@0@1#240#-120%140#120#-240@0".getBytes());
output.write("@1#240#-120%140#120#-240@0@1#240#-120%140#120#-240@0@1#240#-120%140#120#-240@0".getBytes());
output.write("@1#240#-120%140#120#-240@0@1#240#-120%140#120#-240@0@1#240#-120%140#120#-240@0".getBytes());
output.write("@1#240#-120%140#120#-240@0@1#240#-120%140#120#-240@0@1#240#-120%140#120#-240@0".getBytes());
output.write("@1#240#-120%140#120#-240@0@1#240#-120%140#120#-240@0@1#240#-120%140#120#-240@0".getBytes());
output.write("@1#240#-120%140#120#-240@0@1#240#-120%140#120#-240@0@1#240#-120%140#120#-240@0".getBytes());
output.write("@1#240#-120%140#120#-240@0@1#240#-120%140#120#-240@0@1#240#-120%140#120#-240@0".getBytes());
output.write("@1#240#-120%140#120#-240@0@1#240#-120%140#120#-240@0@1#240#-120%140#120#-240@0".getBytes());
output.write("@1#240#-120%140#120#-240@0@1#240#-120%140#120#-240@0@1#240#-120%140#120#-240@0".getBytes());
fermerPort();
Arduino code
void myReadSerialStrv2(int *Autorise,int *Nombresignal,String *StringSignal) {
while (Serial.available() > 0)
{
String readmessage = Serial.readString();
Serial.println(readmessage.length());
StringSignal[Nombresignal[0]]=readmessage; //List of string
Nombresignal[0] =Nombresignal[0]+1;
}
}
Do you know a good way to send a very large list of string to Arduino ?
Because i want to get all the list in arduino then i will call function in arduino that will use this list .