Hi!
Thanks for your quick answer!
I've tried your suggestion (Serial.available() >= 5) but it doesn't work, in fact, Arduino stays waiting forever. I checked the code in
the monitor serial and it works, the problem appears when I do it from C++.
I also tried making a String in the Arduino code until I read a character which I use as an end, but it doesn't work from C++. Here is
this new code:
int orden[5];
[. . .]
i = 0;
continue = 1;
while (continue == 1){
while (Serial.available() > 0){
n = Serial.read();
if (n!='/')
orden = n;
-
else*
-
continue = 0;*
-
i++;*
-
}*
-
}*
_ terminal1 = (orden[0] - 48)*10;_ -
terminal2 = orden[1] - 48 + terminal1;*
-
delay(5); //espera para que le lleguen todos los datos antes de leerlos*
-
[... the rest is nearly the same as before]*
sorry! any new idea about what is happening?