LaurentDelaon
Member
Hi
the following code use to detect endline receive only works with using '\r' test end line and not works with '\n'...
Notice it work perfectly with same function used on serial1 and serial2 with '\n' on the same teensy and same time... (test with same conf gtk_terminal under UnbuntuMate 18.04LTS)
I have pass many hours to found it!
What's happens ?
Laurent.
the following code use to detect endline receive only works with using '\r' test end line and not works with '\n'...
Notice it work perfectly with same function used on serial1 and serial2 with '\n' on the same teensy and same time... (test with same conf gtk_terminal under UnbuntuMate 18.04LTS)
I have pass many hours to found it!
Code:
void serialEvent3() {
//Serial3.println("deb ev3.") ;
while (Serial3.available()) {
//Serial3.println("recup char ev3.");
// récupérer le prochain octet (byte ou char) et l'enlever
char inChar3 = Serial3.read();
inputString3 += inChar3;
//Serial3.println(inChar3) ;
// caractère de fin pour notre chaine
if (inChar3 == '\r') { //doesn't workswith '/n'
stringComplete3 = true;
//Serial3.print("fin de recup.");//
//Serial3.println(inputString3);
//Serial.println("fin ev") ;
};
};
};//serialEvent3()
What's happens ?
Laurent.
Last edited by a moderator: