@rcomeau, printlnf()
will print a CRLF at the end of the line while \n only produces a LF. Some terminals or software libraries require the CR as a line termination character.
As for only working three times, your code doesn’t show whatfnctl.h
and unistd.h
contain so I can’t comment on the mechanics of the transaction. However, have you considered that the delay(1000)
in loop() may create a receive buffer overrun or other condition causing data loss?